Last post Feb 12, 2007 05:52 AM by jumpingmattflash
Feb 12, 2007 05:52 AM|jumpingmattflash|LINK
I've been pulling my hair out over this - i thought it was fixed, but as is often the case - it wasn't
I store in the session a particular date in the format "dd/MM/yyyy HH:mm:ss"
This date format needs to be used throughout the internals - for passing to the SQL etc. However for the UI, it needs to be formatted in the Culture of the UI.
So to do this I created the following method:
DateTime FormatUKDate(String dateToConvert)
"dd/MM/yyyy HH:mm:ss", Thread.CurrentThread.CurrentUICulture);
For the first time this runs - it seems to work OK, however on subsequent calls it formats it as UK regardless. If anyone could provide some resources as to how I could create a method which return a datetime value in
a specified culture i'd be overjoyed!