comparing dates

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
nads1982
Forum Newbie
Posts: 9
Joined: Sat Feb 21, 2004 2:37 pm

comparing dates

Post by nads1982 »

any suggestions for pulling 2 dates types from mysql and discovering which come first??

thanx
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You can either order the dates as you retrieve them if these are dates in different records otherwise retrieve them as UNIX timestamps and compare the size of them - the smaller is the older.

Mac
Post Reply