Jump to content

[SOLVED] Date formatting


chelnov63

Recommended Posts

The dates in my db are stored as timestamps: e.g  2008-09-20 10:38:14

 

I'm trying to display this on the front-end in the format dd/mm/yy e.g 20/09/08

 

I tried doing:

 

echo date("d/m/Y", $rs['from_date']); ?>

 

where $rs['from_date'] = 2008-09-20 10:38:14

 

however the above gives errors:

 

Notice: A non well formed numeric value encountered in C:\htdocs\index.php on line 283
01/01/1970

 

anyone have any ideas? thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/122353-solved-date-formatting/
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.