I have a datetime field ($expdate) where I am storing an expiration date in this format:
2004-03-23 16:36:23
(this is the current value for $expdate)
When I use the following to format the date to make it 'prettier':
Your listings will expire on <? echo date('l, F jS, Y',$expdate);?> at <? echo date('g:i a',$expdate); ?>.
I get this:
Your listings will expire on Wednesday, December 31st, 1969 at 6:33 pm.
:eek:
What am I missing? I've also tried using the strftime() function but get the same results, only less pretty.
All I can think of is that it must be pulling the parts of the date in the wrong order.
any ideas?? suggestions??