I am wondering if there is an easy way to turn a string like: 110811124209.197
into a datetime object where the format is yymmddhhmmss.sss
. If was were using regular .net I would just use
DateTime.ParseExact(MyDateString, "yyMMddHHmmtt.ttt");
but it would seem that ParseExact is not apart DateTime in .net micro
Split the string apart manually and use this constructor: http://msdn.microsoft.com/en-us/library/wb249tb7.aspx
public DateTime(
int year,
int month,
int day,
int hour,
int minute,
int second,
int millisecond
)
You can use String.Substring to split it apart: http://msdn.microsoft.com/en-us/library/aka44szs.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With