Search found 4 matches
- 09 Nov 2019 15:11
- Forum: DOS Batch Forum
- Topic: date and time format inconsistencies
- Replies: 13
- Views: 34749
Re: date and time format inconsistencies
maybe it is hard coded. and maybe someone knows of a list of formats for locales. still puzzles me why %date% and date/t are the same while %time% and time/t are different. and maybe I will end up using wmic
- 09 Nov 2019 13:16
- Forum: DOS Batch Forum
- Topic: date and time format inconsistencies
- Replies: 13
- Views: 34749
Re: date and time format inconsistencies
my use of reg.exe is for demonstration purposes. I would still like to understand how cmd.exe formats time and date. if it's not pulling this information from the registry, then where? and why does time/t and %time% give different results?
- 09 Nov 2019 12:29
- Forum: DOS Batch Forum
- Topic: date and time format inconsistencies
- Replies: 13
- Views: 34749
Re: date and time format inconsistencies
We have large threads about date and time formatting in this forum. They point out that not even the values of the registry keys are reliable to find out how the cmd formats the strings. To cut a long story short - use WMIC I would prefer to do this without any external tools where is cmd.exe getti...
- 09 Nov 2019 11:00
- Forum: DOS Batch Forum
- Topic: date and time format inconsistencies
- Replies: 13
- Views: 34749
date and time format inconsistencies
why does this batch file ... @ echo off cls for /f "tokens=3" %%G in ('reg query ^"HKEY_CURRENT_USER\Control Panel\International^" /v sTimeFormat ^| find ^"REG_SZ^"') do ( set time_format=%%G) echo %time_format% echo time format in registry echo. time/t echo time from time/t command echo. echo %time...