Skip to content.

TalkBMC

Sections

Comment

Above in this comment thread: MS-DOS tips for time and date stamps » Thanks

can u hlp me

Posted by jithendra at 2007-09-25 01:36
i m using windows 2000 server.the command "time/t" returns time in this format :"4:45p" but i need time in this format :"04:45 PM".can u help me???

Windows settings for time/date format

Posted by Anne Gentle at 2007-09-28 12:56
Whether you get AM or PM from your system time depends on the settings in the Control Panel: Regional and Languange Options for Win2K, or
Date, Time, Language, and Regional Options for WinXP I believe. But it doesn't appear that this time variable will echo it for you.

I wonder if you could use cscript.exe and write a javascript that would give you what you need?
See
http://www.merlyn.demon.co.uk/js-date0.htm#TCp

Just an idea, but I think you've hit the limit on what info DOS gives you.
 
 

Powered by Plone

This site conforms to the following standards: