Compare dates

  • Thread starter Thread starter gcotterl
  • Start date Start date
G

gcotterl

What formula can I use to determine if the date if B1 is after the
date in A1?

(Notes: Both dates are formatted MM/DD/CCYY).
 
What formula can I use to determine if the date if B1 is after the
date in A1?

(Notes: Both dates are formatted MM/DD/CCYY).

Excel Date values are stored as a decimal number, The whole number for
the day & the decimal part for the time.

So =INT(B1) > INT(A1)

As the date values are stored as real (or irrational) numbers you
should never use equates in any comparison, always "greater than" or
"less than"...

The display format is either the default, or what you define in cell
format. Dates entered in the standard format for the area are usually
converted to an Excel date value.

Alan Lloyd
 
What do you mean by "real dates"?

One way to determine if you have a "real date" (aka date serial
number) is put the formula =TYPE(A1) in an unused cell, where A1
contains a date. TYPE(A1) should return 1.
 
Let me re-state my question:

How can I determine if the date in B1 is after the date in A1?

This is how each cell is formatted:


A1: 06/23/2000 (format: number: custom: mm/dd/ccyy)
B1: 10-01-2003 (format: number: general)
 
Back
Top