I know this question has been asked zillions of times, but the answers other people get never seem to quite work for me. I have a datetime field in an sql server, which needs to have data entered to it.
I need format through the entire process of submitting, validating and writing to th db to use dd/mm/yyyy, and i am using Session.LCID = 3081 for australian settings, being as how i'm in australia.
If i enter a date in dd/mm/yyyy format where dd is > 12, it spits an error at me
(The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value.)
When i try mm/dd/yyyy it posts fine, but when the date is called from the database, it displays as dd/mm/yyyy.
In fact, when i submit any date (as long as it is in mm/dd/yyyy) it gets recorded to the database as dd/mm/yyyy, so 03/04/2005 ends up as 04/03/2005 and vv.
Does anyone know what is causing this and how i can fix it?
UPDATE: even when not using session.LCID, it still switches from mm/dd/yyyy to dd/mm/yyyy on posting
Edited by ub3rl337ch3ch - 29 May 2005 at 10:53pm