Saved Bookmarks
| 1. |
Solve : Change date format? |
|
Answer» HI, I'am writeing my application date to txtpad using a batch program.the application date looks for example 01012006.is there a way to change 01012006 to 01-01-2006? Regs, JeriThis is one of the those questions where the OS plays an important role. Since you failed to mention yours I can only guess WHETHER this will work or not: Code: [Select]SET dt=01012006 set editdt=%dt:~0,2%-%dt:~2,2%-%dt:~4,4% echo %editdt% Good LUCK. Note: Not sure if your date is mmddyyyy or ddmmyyyy, but you can set dt to any date provided you use the same format.Thanks for your help. Is there a way to change the date without assigning into a variable.for example notepad will only contain 01012006.is there a way to change 01012006 to 01-01-2006.Appricate your help. Regs, Jeri.I admit I'm confused. Notepad is an editor; can you not simply edit the date to whatever format you want? If you want to use a batch file, you might be able to write a search and replace and eliminate Notepad altogether. Is this date always 01012006 or are we talking about the current date? 8-)Check the options for Regional settings in control panel. |
|