sasnaktiv
asked on
Why does ($LastMonth = date("m")-1;) give me 6 instead of 06 ?
Why does $LastMonth = date("m")-1; give me 6 instead of 06 ?
After all, this $ThisMonth = date("m"); gives me 07
How can I get the two digit month for $LastMonth?
Thanks
Sas
After all, this $ThisMonth = date("m"); gives me 07
How can I get the two digit month for $LastMonth?
Thanks
Sas
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Thanks for the points!
Read this carefully.
https://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_201-Handling-date-and-time-in-PHP-and-MySQL.html
Cordial regards, ~Ray
Read this carefully.
https://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_201-Handling-date-and-time-in-PHP-and-MySQL.html
Cordial regards, ~Ray
ASKER