1
Reply

Problems with System.DateTime.Parse

gboldiston

gboldiston

Aug 24 2004 3:06 AM
2.2k
I am writing a program to match up data in two files, primarily by date. The bit that is causing me trouble is as follows. First, I parse a line of a file, and extract the date into 3 variables: FoundDay, FoundMonth & FoundYear. I then create a new System.DateTime object and use the Parse function as follows: CADSTime = System.DateTime.Parse(FoundDay + "/" + FoundMonth + "/" + FoundYear + " " + FoundTime) However, this creates a DateTime object in US date format. ie, 7/1/2004. I need it to be in Australian date format. ie, 1/7/2004, however, I cannot seem to get it to work. If anyone could help me, that would be greatly appreciated.

Answers (1)