Hi,
When i use "%date% %TIME%" in my bat-file the output is like this:
2011-04-24 18:14:39,83
What does "83" mean? How kan i change in "%date% %TIME%" so that i don have the number in the output?
Output of "%date% %TIME%"
Moderator: DosItHelp
Re: Output of "%date% %TIME%"
Rosetta wrote:Hi,
When i use "%date% %TIME%" in my bat-file the output is like this:
2011-04-24 18:14:39,83
What does "83" mean? How kan i change in "%date% %TIME%" so that i don have the number in the output?
It's "18:14:39.83". It's a "." not a ",". It just means centiseconds.
To output the time without that use TIME /T. You'll get something like "02:15 PM".
Re: Output of "%date% %TIME%"
nitt
For me it's also a comma (there are different decimal separators in different counties/languages). It depends on the "international" settings in your registry ...
Regards
aGerman
For me it's also a comma (there are different decimal separators in different counties/languages). It depends on the "international" settings in your registry ...
Regards
aGerman
Re: Output of "%date% %TIME%"
nitt wrote:Rosetta wrote:Hi,
When i use "%date% %TIME%" in my bat-file the output is like this:
2011-04-24 18:14:39,83
What does "83" mean? How kan i change in "%date% %TIME%" so that i don have the number in the output?
It's "18:14:39.83". It's a "." not a ",". It just means centiseconds.
To output the time without that use TIME /T. You'll get something like "02:15 PM".
THANX nitt, for ur help but it did not change the output. The code is:
echo The file was copied at: %date% %TIME% >> MyLog.log
And i tested the followings:
echo The file was copied at: %date% %TIME/T.% >> MyLog.log
echo The file was copied at: %date% %TIME/T% >> MyLog.log
echo The file was copied at: %date% %TIME%/T. >> MyLog.log
echo The file was copied at: %date% %TIME% /T >> MyLog.log
echo The file was copied at: %date% TIME /T. >> MyLog.log
But none of them changed the output. How did you mean the code shuld be?[/quote]
Re: Output of "%date% %TIME%"
You could cut the last 3 characters using %time:~,-3%.
Regards
aGerman
Regards
aGerman
Re: Output of "%date% %TIME%"
aGerman wrote:You could cut the last 3 characters using %time:~,-3%.
Regards
aGerman
GREATE aGerman! It works! THANX a lot!
Re: Output of "%date% %TIME%"
aGerman wrote:For me it's also a comma (there are different decimal separators in different counties/languages). It depends on the "international" settings in your registry ...
I've never understood why the Euopeans use a comma as a decimal point... People over here in New Zealand confuse foriegn people when they use a comma like: 1,000,000
Oh well, it's off topic anyways
phillid
Re: Output of "%date% %TIME%"
If you really want to get the time properly...
Just google for "command line date&time utility"...
Just google for "command line date&time utility"...