Jump to content

Help plz:Date Format


delickate

Recommended Posts

Hi guys,

 

I'm changing date format. like this

$date = '10/07/2008';

echo $date = date('M j, Y', $date);

its output like this :

Oct 7,2008

it wokrs perfect.

 

but when i fetch date from databse base. its out put is like

Jan 1, 1970

 

i stored the date in date base like : 10/07/2008

 

write the code like:

 

$date = $GB_DATE;  //$GB_DATE is the field name of database table and its value is :10/07/2008

echo $date = date('M j, Y', $date);

 

but its out put is like:

Jan 1, 1970

 

any body know why is happening?

any body have solution plz

 

Link to comment
https://forums.phpfreaks.com/topic/119100-help-plzdate-format/
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.