Jump to content

[SOLVED] Datetime in PHP help


s_ainley87

Recommended Posts

Hello,

 

I have a mysql field of the datetime date type and I needing to break it apart when it is pulled out the database so that I can put each bit in its own section the page, how would I do this? I assumed it would be something like

 

date('M', $data['updated_at']);

 

*repeat for each section*

 

however when I run this I get JAN 01 1970, I am asumming date can only be used with timestamps? if so I am stuck, could I convert the date to a time stamp and then do it or is there a quicker way?

 

however this returns

Link to comment
https://forums.phpfreaks.com/topic/140499-solved-datetime-in-php-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.