Jump to content

Format date from value in table


Smudly

Recommended Posts

Hey, I am grabbing a date from a row in my table which is currently formatted as:

date("Y-m-d")

2010-09-29

 

So in my code I have something like this:

 

$row['date'];

 

How do I use this to rearrange the date to look like:

 

09-29-2010

 

I looked at the formatting tutorials, but they explain how to format it for the date you are currently setting into a variable.

 

 

Link to comment
Share on other sites

Alright, that may contradict with the queries I already have going. How would I modify this?

 

 

$result = mysql_query("SELECT * FROM sheets WHERE artist REGEXP '^[$mysortletter]' && active='yes' && title!='' ORDER BY artist $sortcount");

 

 

 

Link to comment
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.