Compare dates

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).
 
A

alanglloyd

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
 
H

Harald Staff

What do you mean by "real dates"?

Real dates in Excel are understood as dates by Excel. Good signs are that
they right align in the cell on entry and often display a slightly different
date format in the formula bar. You can format a real date to show or hide
part of date/time different without changing the actual value (shown in the
formula bar).

Opposed to date-looking text, Excel can't compute with those. Typically
entered with leading weekday or missing/wrong delimiters:

Monday June 1st
12121960

HTH. Best wishes Harald
 
J

joeu2004

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.
 
G

gcotterl

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top