I am trying to input the time in 2 fields (From - To). Fields are defined in XML Joomla file.
format="%H:%M"
type="calendar"
When I input 24:00 in one of the fields, Joomla accepts the entry and inserts 00:00
in the db (fields in the MySQL db are Date-time). When I retrieve it back I have 00:00
in the field and when i save it back as is, it does not accept it.
Can you please help? Thanks in Advance
MySQL DATETIME Format is YYYY-MM-DD HH:MM:SS
. Have you checked the actual MySQL table? Does it really have 00:00, or a YYYY-MM-DD HH:MM:SS
format?
I think it's the second option and Joomla does SELECT DATE_FORMAT('2007-10-04 22:23:00', '%H:%i');
to display your entry as HH:MM
If this is the case you should select the 'from' field and insert in the 'to' field without doing the DATE_FORMAT
filter.