Convert this string to a datetime

A

artist

Hi,

Do you guys know if there is an easy way to convert a string like this:

20080917005525.670

to a DateTime without having to parse the whole string?


Thanks!
 
A

artist

I think I got it:

DateTime.ParseExact(message.timeStamp.ToString(), "yyyyMMddHHmmss.fff",
System.Globalization.CultureInfo.InvariantCulture);

thanks anyway
 

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

Top