Hi All,
Im having real problems with the date formats in VB 2005.
Imports System.Globalization
Dim auCulture As CultureInfo = New CultureInfo("en-AU")
Dim TheDate As DateTime
TheDate = DateTime.ParseExact(CurrentDay, "dd/mm/yyyy", auCulture.DateTimeFormat)
Im trying to convert a string in Au format date to a date so that I can perform some date calculations.
I for the life of me cannot piece this together. Could someone please help me with this. I have tried various other methods and everytime I get 12/1/2007 when the String is 1/12/2007 (1st December) with the above example Im getting 1/1/2007. The program recognises that the AU format is right , lists the various formats as correct but doesent actually apply them.
Thanks,
frustrated
Michal
Im having real problems with the date formats in VB 2005.
Imports System.Globalization
Dim auCulture As CultureInfo = New CultureInfo("en-AU")
Dim TheDate As DateTime
TheDate = DateTime.ParseExact(CurrentDay, "dd/mm/yyyy", auCulture.DateTimeFormat)
Im trying to convert a string in Au format date to a date so that I can perform some date calculations.
I for the life of me cannot piece this together. Could someone please help me with this. I have tried various other methods and everytime I get 12/1/2007 when the String is 1/12/2007 (1st December) with the above example Im getting 1/1/2007. The program recognises that the AU format is right , lists the various formats as correct but doesent actually apply them.
Thanks,
frustrated
Michal