I want to search a record that have create the 19/07/2006 (today)
I stock in ‘date_creation’ type DATETIME , this date.
But when I do a search I can’t find this record.
My code is:
forms.find_record.controller.find();
date_creation = utils.dateFormat(globals.date_enter,‘dd/MM/yyyy’)+‘|dd/MM/yyyy’;
forms.find_record.controller.search();
this code work only when I Add “<=” or “>=” front of methode ‘utils.dateFormat’.
I have no error when I execute this code.
‘globals.date_enter’ is a datetime too.
Datetimes are stored as GMT in the db, sorting is done based on that.
The timezone you see is formatted (and converted from GMT) based on your OS settings
I realize that datetimes are stored in GMT. So, if someone in Amsterdam and New York both enter today’s date in a datetime field, you might have:
Mon Jul 24 2006 00:00:00 GMT+0200 (not sure if that’s the right offset)
Mon Jul 24 2006 00:00:00 GMT-0400
These will sort differently, right? So, it might be better off to just use a date field and not a datetime field?