In my Worpdress site I am using the function current time to return the current date in MySQL timestamp data type format.
My goal is to perfom some operations on the result (like substracting 1 day). I found on the web date_sub
but the requirement is that its parameter should be a DateTime
type.
Warning: date_sub() expects parameter 1 to be DateTime, string given in C:\xampp\htdocs\blog\wp-content\themes\twentyten\header.php on line 107
How can I perform substraction on the MySQL timestamp data type format, or is there a Worpdress function that returns current date in DataTime
format?
You help is always appreciated.