Jump to content

[SOLVED] Date Format


Ell20

Recommended Posts

Hi,

 

I am having abit of a nightmare with displaying the date.

 

I have set up my mysql field to be date, but that requires a format of Y, M, D and because im english, and this is going to be an english website I want the date to be in D, M, Y format.

 

I have this:

 

<?php
echo $date2;
date('Y-M-D', $date2);
?>

 

The first prints: 2007-11-09

The second errors: An error occured in script /home/mysport/public_html/stats.php on line 93: A non well formed numeric value encountered

 

What the best way to get this working properly?

 

Thanks

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