Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

weird date error

Status
Not open for further replies.

siena

Technical User
Jan 30, 2003
262
0
0
US
When I create an insert statement that contains a date,
it is usually inserted into the sql server db as mm/dd/yyyy but when I pull up the same date for update, it is displayed in this format:
dd/mm/yyyy.
As a result, if I have a date that was inserted into the db as 02/13/2003, when I want to update the field, it displays as 13/02/2003.
This is causing this error:
][SQL Server]The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
Can someone please tell me how I can resolve this?
Thanks in advannce
 
I have never had this problem. This may be a server setting. Otherwise you will just have to format the date before an insert and before display, which is easy using the
Day, Year, Month or Left & Right functions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top