navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

*(#&$*##$!! SQL dates - HELP!

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> *(#&$*##$!! SQL dates - HELP!
Page: [1]
 
Topic Starter

 

Posts: 49
From: Canada, eh?
Status: offline

 
*(#&$*##$!! SQL dates - HELP! - 8/5/2002 0:27:48   
Ever seen a grown man cry??

I am in Canada. I have a SQL database that stores date/time values as:

14/07/2002

When I query the database, the date comes out as this:

14/07/2002

But when I want to update that field, I have to enter the date as:

07/14/2002

Or I get the error:

Microsoft OLE DB Provider for ODBC Drivers error ' 80040e07'

[Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

My response.write of my SQL statement:

UPDATE Event SET StartDate=convert(datetime, ' 14/01/1900' ),.....

If I remove the ' ' from there, I get the date entered in as

01/01/1900

What on earth is going on? How can I fix this? This is not making sense to me in the least!

< Message edited by Topic Starter -- 8/4/2002 12:28:23 AM >
caywind

 

Posts: 1479
From: USA
Status: offline

 
RE: *(#&$*##$!! SQL dates - HELP! - 8/5/2002 2:38:16   
work is being done on this same topic here...

http://www.frontpagewebmaster.com/tm.asp?m=82085&p=1&tmode=1

The problem is that the date format is different in the US and Canada.
12/31/2012 US

31/12/2012 CA

out of range means that there can' t be >12 months in a year

(in reply to Topic Starter)
Doug G

 

Posts: 1189
Joined: 12/29/2001
From: SoCal
Status: offline

 
RE: *(#&$*##$!! SQL dates - HELP! - 8/5/2002 22:17:21   
Just guessing, I believe this can happen when your server' s LCID (locale) is different from the database locale. Your FP or asp code will use the server' s date format and pass that to the db which pukes because the db is working in a different date format.

Just guessing tho, haven' t had this problem myself.


_____________________________

======
Doug G
======

(in reply to Topic Starter)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> *(#&$*##$!! SQL dates - HELP!
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts