Kurt111780
Technical User
Hello,
In one script I need to get the current date and time then add a certain number of hours or days to it before storing it in the database.
Then on another page a script will compare the current date and time to the one stored in the database. if ($DBtime >= $currTime)
I was going to store the date using this format $timeStamp = date("YmdHis"); but then how can I add days or hours to it? Should I use DateTime field type in MySql?
Thanks,
Kurt
It's only easy when you know how.
In one script I need to get the current date and time then add a certain number of hours or days to it before storing it in the database.
Then on another page a script will compare the current date and time to the one stored in the database. if ($DBtime >= $currTime)
I was going to store the date using this format $timeStamp = date("YmdHis"); but then how can I add days or hours to it? Should I use DateTime field type in MySql?
Thanks,
Kurt
It's only easy when you know how.