Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi, I am using command prompt and I entered the following command:
--> NET TIME

It returned me the following message:
Current time at......is 2:09:45 PM
The command completed successfully.

As from the message above, the time do not have milliseconds. How can I include also the milliseconds using the same command: NET TIME ?

Any input is appreciated. Thank you.
Posted
Comments
Sergey Alexandrovich Kryukov 17-Apr-15 2:28am    
Are you sure you are talking about MS-DOS? Where did you dig it out?
—SA
Jamie888 17-Apr-15 3:29am    
Hi Sir, I am using Windows command prompt.
Sergey Alexandrovich Kryukov 17-Apr-15 12:18pm    
Okay, and you still have a delusion that you have something related to MS-DOS? No, you don't. Not even "DOS". There is no such thing. CMD.EXE is nothing but a regular Win32 application you could write all by yourself, if you wanted to do this mind-clearing exercise. It just uses the regular shell API; passes strings entered by the user and displays the result.

Your question is simply off-topic. It is on the level of a regular system user, not a software developer. Remember, this site is dedicated to software professionals, including students, but not software users. Playing with system commands has nothing to do with software development.

—SA
Jamie888 18-Apr-15 2:15am    
Hi Sir, I have some codes written in C# that will get the value being passed from NET TIME into my program. I shall update the question with the C# codes attached so that you may have a clearer picture of it.
Tomas Takac 17-Apr-15 2:32am    
%time% variable has current time with milliseconds, can you use that?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900