chelnov63 Posted September 2, 2008 Share Posted September 2, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/122353-solved-date-formatting/ Share on other sites More sharing options...
chelnov63 Posted September 2, 2008 Author Share Posted September 2, 2008 got it: strtotime($row_rsGigs['from_date']) thanks Quote Link to comment https://forums.phpfreaks.com/topic/122353-solved-date-formatting/#findComment-631773 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.