Jump to content

formatting dates taken from database


mysty

Recommended Posts

<?php echo $_SESSION['MY_date'] ?>

 

This is line of code that gets a date from a session variable. The session variable, MY_date, comes from a database DATE field.

The output is like this: 2007-01-01. What I want the output to look like is this: January 1, 2007.

How do I do that? or what changes are needed in the above code?

Link to comment
https://forums.phpfreaks.com/topic/43991-formatting-dates-taken-from-database/
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.