I'm using DateTime.Parse to convert 2 strings into DateTimes to find the time between the two.
Now if the string was in the format dd/mm/yyyy hh:mm:ss my code would work perfectly because im in the UK. However, the string is always mm/dd/yyyy hh:mm:ss so Parse always throws a fit when it gets there or if the dd is 12 or less returns the wrong date.
How do I get my app to think its in the US just for that one line of code so it will recognise something like say 10/31/2003 as a valid date?
Cheers.
Now if the string was in the format dd/mm/yyyy hh:mm:ss my code would work perfectly because im in the UK. However, the string is always mm/dd/yyyy hh:mm:ss so Parse always throws a fit when it gets there or if the dd is 12 or less returns the wrong date.
How do I get my app to think its in the US just for that one line of code so it will recognise something like say 10/31/2003 as a valid date?
Cheers.