Link to home
Create AccountLog in
Avatar of sasnaktiv
sasnaktivFlag for United States of America

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
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of sasnaktiv

ASKER

Thank you Ray.