Date not the same as database!
Hi all
I changed my database field type from timestamp to date in mysql as I wanted to get rid of the time after the date. I changed the cfqueryparam cfsqltype to cf_sql_date and so far so good it now updates the correct date into the database without any time: 2012-06-30
When I output the value in my form however it shows a different date for some strange reason:
Fri Jun 29 23:00:00 GMT-0500 2012
This is the code I am using to output the date which has always worked fine showing the correct date. I have taken care to remove anything in the rest of my code that could affect the database result:
<cfformitem type="html" width="90" label="Present" bind="{UsersGrid.dataProvider[UsersGrid.selectedIndex]['MEETING']}" onChange="UsersGrid.dataProvider.editField(UsersGrid.selectedIndex, 'MEETING', MEETING.text);">
UPDATED: I did a cfdump on the query and the record in question shows this value in the cfdump but not on the page:
{ts '2012-06-30 00:00:00'}
Why am I getting the wrong date, do I need to dateformat MEETING.text or something? Quite why the date would be changed I don't understand at all. Thanks for any pointers!
