Jump to content

php date format


CanMan2004

Recommended Posts

Hi all

I have a coloum in my db called "expires" whichb stores a date stamp in the format

YYYY-MM-DD

I then print this date using

<? print $rows['expires'];?>

when I print the above, it prints an output like

2006-01-04

how can I get php to format the date and display it as

04-01-2006

so its printing in the format

DD-MM-YYYY

Can anyone help?

Thanks in advance

Ed
Link to comment
https://forums.phpfreaks.com/topic/10943-php-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.