I am having a little problem with writing a date in the format mm/dd/yyyy to an access database. I have a text file that is uploaded to a server which I insert into a database, the file fields are is importing properly there is one field in my database for when the file is run.
So I do this
some code
<cfset sqlstring = sqlstring&"'#listgetat(record,7,chr(9)&chr(7))#',">
<cfset sqlstring = sqlstring&"#dateformat(now(),"mm/dd/yyyy")#,">
<cfset sqlstring = sqlstring&"'#listgetat(record,12,chr(9)&chr(7))#'">
some code
When I do this
<cfoutput>#PreserveSingleQuotes(sqlstring)#</cfoutput>
And view the SQL on the screen the date is fine but when I display it from the database
I get 1899/12/30 , I also tried #dateformat(createODBCDate(now(),"mm/dd/yyyy"))# but I get errors.
Can someone point me in the right direction?
Thanks
Mike
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

