Batch variable containing date mmddyyyy to convert to yymmdd
Posted: 15 Sep 2010 08:35
Hello!
I have a long batch file that calculates a specific date based on user input, however, the variable echoed at the end contains mmddyyyy as format. This is NOT the sysdate. I need to convert this into yymmdd format and echo it. Variable gets the date by echo %mm%/%dd%/%yyyy% but of course changing the order and doing %yy%/%mm/%dd% still gives the year as 2010 and I only need 10. Is there a way to do this?
Thanks in advance
Dea
I have a long batch file that calculates a specific date based on user input, however, the variable echoed at the end contains mmddyyyy as format. This is NOT the sysdate. I need to convert this into yymmdd format and echo it. Variable gets the date by echo %mm%/%dd%/%yyyy% but of course changing the order and doing %yy%/%mm/%dd% still gives the year as 2010 and I only need 10. Is there a way to do this?
Thanks in advance
Dea