0

DateTime.UtcNow gets the system date and time,
so I was wondering if there is any function to extract only the syetem time and not the date.

If not just in case any one knows how to do that...
plz revert back...

Thanks in earnest...

3
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by Reinard
0

Problem solved.

It just occured to me that i can extract the individual hrs, min and sec instances and concatenate them to get the actual system time.

Thanks again:)

well if any one knows any other way u can get back to me.

0

I am a little uncertain of what you wan't so I apologize if I am completly off the mark. But if you want the current time in ticks the actual datetime structure has a Ticks property you can use this in conjunction with DateTime.Now or DateTime.UtcNow so DateTime.UtcNow.Ticks ... Hope this helps

0

Thanks for reverting back.
But the .Ticks Property gives the number of ticks that represent the current date and time.
I am sorry but that was not exactly my question.

I want to extract the current system time (and not the date).
Let me Put it in another way...
I had a query like "whether there's any inbuilt function that can get the System Time.:)

0

Have you tried:

DateTime.Now.ToShortTimeString();
or
DateTime.Now.ToLongTimeString();

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.