• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

True/False for date comparison

James Nix

New Member
I want to compare two dates in different fields to determine if the date reported was in the same month as the event date.

Event date Reported date
1/12/2014 1/15/2014
1/15/2014 3/10/2014
 
Hi James ,

There are 2 ways :

1. Compare the month and the year of both dates :

=AND(MONTH(Eventdate) = MONTH(Reporteddate) , YEAR(Eventdate) = YEAR(Reporteddate))

2. Use the TEXT function :

=TEXT(Eventdate , "yyyymm") = TEXT(Reporteddate , "yyyymm")

Narayan
 
Back
Top