I'm trying to insert the current date into the db with the following code, but it's showing up as 1/1/1900 in the db.
I know I can just set the default value in the db to today's date, but I need to do this with CF.
Anyone see what I'm doing wrong?
<cfset today = DateFormat(Now(),"mm/dd/yy">
<cfquery name="insert" datasource="#ds#">
INSERT INTO sri_contact(blah1, blah2, date_sent)
VALUES(#blah1#, #blah2#, #today#)
</cfquery>
I know I can just set the default value in the db to today's date, but I need to do this with CF.
Anyone see what I'm doing wrong?
<cfset today = DateFormat(Now(),"mm/dd/yy">
<cfquery name="insert" datasource="#ds#">
INSERT INTO sri_contact(blah1, blah2, date_sent)
VALUES(#blah1#, #blah2#, #today#)
</cfquery>