Jump to content

Archived

This topic is now archived and is closed to further replies.

Matt Ridge

Changing Date Format?

Recommended Posts

I have a database that produces a date as year/month/day

 

I want it to be more "Americanized" which is month/day/year as its output, is that possible?

Share this post


Link to post
Share on other sites

Details?

 

It's a simple as that, the database I designed is putting dates in as Y-m-d, I am asking is there a way to change it pre or post SQL to m-d-Y?

Share this post


Link to post
Share on other sites

there are really two routes that you can take for this.. you can take the MYSQL route and use mysql functions for this, or you can go the PHP route and use PHP's built in date-time functions for this.. either of these you can google for

Share this post


Link to post
Share on other sites

The answer can only be as specific as the information provided. The OP didn't even see fit to mention what RDBMS is being used, and didn't bother to provide so much as a query string or a table description.

Share this post


Link to post
Share on other sites

(Pikachu2000 - the Help Vampire slayer, lol)

 

Matt Ridge,

check out:

  date_parse_from_format()

  mktime()

  date()

and such.

 

An learning to ask better questions will help too.

http://slash7.com/2006/12/22/vampires/

in most cases, the quality of the answer reflects the quality of the question..

Share this post


Link to post
Share on other sites
in most cases, the quality of the answer reflects the quality of the question.

quite right, which is why I recommend the OP learn how to ask better questions. Assuming that "Yes" isn't the answer he wanted, even though it was a legit and accurate answer to the question he asked.

Share this post


Link to post
Share on other sites

in most cases, the quality of the answer reflects the quality of the question.

quite right, which is why I recommend the OP learn how to ask better questions. Assuming that "Yes" isn't the answer he wanted, even though it was a legit and accurate answer to the question he asked.

 

Actually it was the answer I needed. I was asking in a generic sense... I didn't feel the need to go into a tirade like I normally do.  I'm on a time crunch.

Share this post


Link to post
Share on other sites

×
×
  • 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.