I want to insert date into a Mysql table. The application will get date in the format of (dd/mm/yyyy). How can I insert the date into the table using phalcon PHP ORM ?
I do lot search on google to find how to change date format in PHP but I can't find any. Can you help me to convert dd/mm/yyyy to yyyy/mm/dd format in PHP ?
This is not the best approach. If the database has column defined as TIMESTAMP or DATETIME, you should just pass now() to that model property and that way force database layer to write the correct date (and time).