Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch    |    Fun with MS-DOS batch files    |    42,547 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 41,991 of 42,547    |
|    Herbert Kleebauer to Chris Roberts    |
|    Re: DOS Batch program countdown days unt    |
|    05 Feb 22 18:24:12    |
   
   From: klee@unibwm.de   
      
   On 04.02.2022 23:11, Chris Roberts wrote:   
      
   > I have worked more with at bash and python, but now at a windows centric job   
   so trying to learn to do it all again with DOS.. :-(   
      
   Why not activate the "Windows Subsystem for Linux" and use bash?   
      
   https://docs.microsoft.com/en-us/windows/wsl/   
      
      
      
   > set ret=2029-06-8   
   > for /f "tokens=1,2* delims=- " %%G in ('ECHO %ret%') do (   
   > Set RetY=%%G   
   > Set RetD=%%H   
   > Set RetM=%%I   
   > )   
   > set /a diff_y=%RetY%-%PresY%   
   > set /a diff_m=%RetM%-%PresM%   
   > set /a diff_d=%RetD%-%PresD%   
   > echo Present date is: %dd%   
      
   Just a note: numbers staring with "0" are octal numbers.   
   So if RetD is "08", it can't be used in a "set /a" command   
   because 08 isn't a legal octal number.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca