I have a variable for date called datefromx of type date echo (date("M Y",$datefromx)); it returns Dec 1969 ???? not Feb 2002
date() needs a unix_timestamp as parameter, not date. It evaluates your date as an integer and interprets as number of seconds. Still wonder why are you getting date before 1970, when the unix epoch starts.
try this instead:
<?php echo (date("M Y",strtotime($datefromx))); ?>
I'm not totally sure it'll work but it's worth a try.
Thank jisatsusha, What is the best way to compare dates in that format to make sure one date is after the other?
Thanks, rmr