My script receives multiple variables from the user. Each variable has part of the date/time (year,month,day,hour,min). All the info is stored in separate variables.
I would like to format all that into an acceptable MySQL DATETIME format so it can be saved in a DB.
The mktime() and strtotime() functions are helpful here. Without an example of what you’re working with, I can’t give you a better example than the links.
Then you’d format your timestamp with date():