|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Date/Time in SQL
Hey again, i'm trying to get CF to put the date or date/time into the SQL 2003 date/time field.
So far i've tried a few things, I thought this was going to work... insert into history (daytime) values ('#DateFormat(CreateODBCDate(now()), "DDMMYYYY")#') my error was Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. the SQL date/time field is 8 characters long, so, I don't know the best way to go about shoving a date/time into it in CF. Thanks |
|
#2
|
|||
|
|||
|
Nevermind, I suppose I don't need to use the specified date/time field...if I change the field to varchar it works no problem. Although, it seems like a lame work around to me
|
|
#3
|
|||
|
|||
|
Question
Quote:
What is SQL 2003? What is your db?I've used the CreateODBCDate() function sucessfully in inserts to MS SQL Server 2000 and MySQL with no issues as long as the colum data type is defined correctly. Mark Holm |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Date/Time in SQL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|