DateTime to String?
Author: dansmo
Creation Date: 3/12/2010 9:10 AM
profile picture

dansmo

#1
Hi,

how can I convert dateTime to a string?

I tried it this way, but that is not correct:
CODE:
Please log in to see this code.
profile picture

thodder

#2
You're probably looking for one of these two formats:
CODE:
Please log in to see this code.


See link:
http://msdn.microsoft.com/en-us/library/system.datetime_members(VS.80).aspx
profile picture

Eugene

#3
TimeOfDay is a TimeSpan (search for more).

With custom format strings, you can have almost any output string:
CODE:
Please log in to see this code.



profile picture

dansmo

#4
Thank you both for your quick answer.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).