landingnormand
Member
- Joined
- Mar 26, 2009
- Messages
- 15
- Programming Experience
- Beginner
Hi,
When reading a date from a file which is in the format yyyy/MM/dd HH:mm:ss, how can I ensure that the date gets parsed correctly regardless of the country or culture where my program is installed. I'm guessing that the following is not enough
i.e. it could get interpretted (?) as either
May 6th 2010 4:22PM (Correctly)
June 5th 2010 4:22PM (Incorrectly)
Thanks
When reading a date from a file which is in the format yyyy/MM/dd HH:mm:ss, how can I ensure that the date gets parsed correctly regardless of the country or culture where my program is installed. I'm guessing that the following is not enough
VB.NET:
Dim s as String = "2010/05/06 16:22:00" ' i.e. May 6th 2010 4:22PM
Dim d as Date = Date.Parse(s)
i.e. it could get interpretted (?) as either
May 6th 2010 4:22PM (Correctly)
June 5th 2010 4:22PM (Incorrectly)
Thanks