Thanks
YugalMake sure the date to save is a valid date and either use CreateODBCDate(yourDate)
or CreateODBCDateTime(yourDate)
or better let <cfqueryparam>
do the work for you
INSERT into myTable
(myDate)
VALUES
(<cfqueryparam cfsqltype="cf_sql_date" value="#yourDate#">)
Make sure you're entering dates in date columns and not string values, as the default cast of string --> date in the database could change at any time.
e.g.
insert into TableX (myDateCol) SELECT STR_TO_DATE('01,5,2013','%d,%m,%Y') ...
and not
insert into TableX (myDateCol) SELECT '05/01/2013' ...
or however that is constructed in coldfusion.
I think you have to mention which format you are giving.
Insert into table TABLE values(XX,'TO_DATE('03-10-92','MM-DD-YY')',XXXXX);
精彩评论