Dates, need help...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
WithHisStripes
Forum Contributor
Posts: 131
Joined: Tue Sep 13, 2005 7:48 pm

Dates, need help...

Post by WithHisStripes »

Heya - so MySQL date/time stamp looks like this: YYYY-MM-DD HH:MM:SS

But I need it to know how to order dates that are represented like this: June 10th, 2009 at 11:41 AM

Is there a way to accomplish this?

Thanks!
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: Dates, need help...

Post by s.dot »

Have a look at strtotime(). It will convert your dates into unix timestamps that can be ordered numerically.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply