From: fake@ddress.no   
      
   On Fri, 4 Feb 2022 14:11:00 -0800 (PST), Chris Roberts   
    wrote:   
      
   >windows centric job so trying to learn   
      
   There is a large difference between MS-DOS and Windows' Command   
   Prompt. The batch language in Windows is quite a bit more powerful.   
   Additionally, you can take advantage of built-in features like   
   VBScript and PowerShell.   
      
   For simple things, batch is still quite handy, but for anything   
   non-trivial (like date arithmetic), there are better options.   
      
   Date arithmetic is super simple in PowerShell. And if you need to, you   
   can also wrap PowerShell scripts in a batch script.   
      
   In PowerShell, your problem could be solved like this:   
      
   ((Get-Date -Day 8 -Month 11 -Year 2022) - (Get-Date)).Days   
      
   If you want to wrap it in a batch script, do this (single line):   
      
   powershell -command "((Get-Date -Day 8 -Month 11 -Year 2022) -   
   (Get-Date)).Days"   
      
   Note that this formula will give you the time from now until the same   
   time of day on that other date. If you want to calculate the time   
   until the clock strikes midnight on that day, you will need to also   
   specify hours, minutes and seconds.   
   --   
   RoRo   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|