Page 1 of 1
String to DateTime Convert
Posted: Tue Dec 14, 2010 9:40 am
by kirtapatrik
Hello Community
How is it possible to convert a string (eg "15.12.2011 (dd.mm.yyyy)) to a DateTime type?
Thanks a lot
Patrik
String to DateTime Convert
Posted: Tue Dec 14, 2010 9:47 am
by JorisWils
have you tried using .Net code? The Parse or ParseExact method?
http://msdn.microsoft.com/en-us/library/1k1skd40.aspx
http://msdn.microsoft.com/en-us/library/kc8s65zs.aspx
DateTime myDateTime = DateTime.Parse(strDateTime );
or maybe
DateTime dt=Convert.ToDateTime(strDateTime );
String to DateTime Convert
Posted: Tue Dec 14, 2010 10:25 am
by kirtapatrik
HI
Sometimes it is too simple.
>> DateTime.Parse("15.12.2010")
Thanks
Patrik