System date/time

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

How can I get the system date and system time (separately)?

I have tried now() but it returns both date/time.

Thanks

Regards
 
Have you tried now.ToShortDateString and now.ToShortTimeString
 
* "John said:
How can I get the system date and system time (separately)?

I have tried now() but it returns both date/time.

\\\
MsgBox(DateTime.Now.ToShortDateString())
MsgBox(DateTime.Now.ToShortTimeString())
///

.... assuming that you want to convert both to a string representation.
 
John said:
How can I get the system date and system time (separately)?

I have tried now() but it returns both date/time.

Yes, now returns both. It returns a DateTime object, and you can use
it's Date and TimeOfDay properties.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top