Beware this content is over 8 years old and considered stale. It may no longer be accurate and/or reflect the understanding of the author but remains here for reference only. Please keep this in mind as you use this content.
Just a quick snippet that I wanted to keep in case I ever need it. And also because I’ve not posted an update here in quite some time.
I simply needed a way to pass a date time value from the client-side to the database and needed formatted in such a way that it could be used within a MySQL query.