Forums

php return date showing crazy numbers

mduda 27 May, 2015
Trying to pull the unix date and time from a table. This is what I have for my php:

o.order_modified:return date("m/d/Y g:i:s", strtotime($cell));


I'm getting crazy results - what am I missing here?
[attachment=0]cc_returndate_question.png[/attachment]
GreyHead 27 May, 2015
Hi mduda,

What are the values of $cell?

Bob
mduda 27 May, 2015
[attachment=0]cc_order_modified.png[/attachment]
GreyHead 27 May, 2015
Hi mduda,

Please try
o.order_modified:return date("m/d/Y g:i:s", $cell);
No need for the strtotime() as you already have a timestamp.
Bob
mduda 27 May, 2015
Ugh. Now that makes sense! Thanks Bob!
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger