Last post Nov 21, 2007 04:58 AM by patelsaurabh82
Nov 21, 2007 03:19 AM|whisky|LINK
I have a textbox where users enter date in the format dd/MM/yy.
I have a stored procedures that inserts the vaue into the database and the datatype for the @date parameter is datetime.
I also have a culture function in the page. If the culture is Swedish Krona for some reason it enters the date as yy-MM-dd
So if user enters 12/02/07 in the textbox the value sent to the sp will be 2012-02-07. This only happens with Swedish Krona (Danish Krona is fine). How can I force the value entered to to be in the correct format ?
Nov 21, 2007 04:51 AM|pradeep7n|LINK
Set the date format according to the culture at the time of displaying the data not at the time of saving.
Nov 21, 2007 04:58 AM|patelsaurabh82|LINK
in culture from tru with en-CA , and also you can change your regional settings