0

Possible Duplicate:
How to Compare Dates in php?

I have these two dates

1305004066

1305007443

I want to compare which one is later on than other. How can I do that

Community
  • 1
  • 1
Asim Zaidi
  • 27,016
  • 49
  • 132
  • 221
  • 2
    In your case however, it's just a question of a `>` comparison or `max()` http://php.net/max – Pekka May 10 '11 at 06:16

1 Answers1

3

If it's UNIX timestamps (seconds since 1970-01-01), the largest one is the latest:

$latest = max($time1, $time2);
Emil Vikström
  • 90,431
  • 16
  • 141
  • 175