RockScience
RockScience

Reputation: 18580

Compare dates in Google Spreadsheet

I have in a google spreadsheet:

How can I obtain TRUE when comparing these 2 cells?

I have tried

=A1=A2

and

=TEXT(A1)=A2

and

=A1=DATEVALUE(A2)

Upvotes: 2

Views: 12392

Answers (1)

Vasim
Vasim

Reputation: 3143

The following formula will convert your text date to number (dates actually are numbers)

=datevalue(MID(A2,FIND("day ",A2)+4,20))

So given above your formula should be

=A1=datevalue(MID(A2,FIND("day ",A2)+4,20))

How does it works?

The MIDformula extracts the date in dd/mm/yyyy format. i.e it finds "day " in the cell and remove everything that's before it.

The DATEVALUE formula is used to convert a string (text) date into a numerical date.

Upvotes: 3

Related Questions