Just one question.
I am trying to put a date in a database. But I am not having much luck. I have created the date object. But what do I put in the insert query for the dt variable?
If I understand your question correctly all you need to store is the date string, not a date object. So, if $date = "2018/06/30"; then you put $date in the query.
Since it's been awhile since I've inserted any dates I went back and looked at some old code. I used the date and strtotime commands, like this:
Oh, I remember why I used that old code. The user date format is not the same as the date format I use in the database so I used that 1 line of code to convert the user date into a database date (format wise).
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)