If and formula where the criteria are dates

Occasional Visitor

I need a formula that will pull the value in a cell if date is between 2 values

 

example:  if C2 (date) is >= January 1, 2018 and also <= May 31, 2018, then I need the value, but 0 if not.  I tried =if(and(C2>=01/01/2018,C2<=05/31/2018),E2,0) but it didn't work.  do I need to convert the date to a number?

0 Replies