# Calculating dates problem...

• ### Question

• Hi

I created a date field called Planned Finish date.  The problem is that that the date is stored with an 8 am extension and the Finish date is a 5pm extension.  When I use the DateDifferent function it returns the project is late even if both dates are on the same day.  Is there anything I can do about this?

Many thanks

James

• Edited by Wednesday, June 14, 2017 1:56 PM
Wednesday, June 14, 2017 1:56 PM

• Use either DateValue or Int function to remove the time part. For example, perform the comparison for equality as follows:

DateValue([Planned Finish]) = DateValue([Finish]) or Int([Planned Finish]) = Int([Finish])

Both expressions compare only the date parts of the date information by ignoring the time parts.

Ismet Kocaman | eBook on Formulas

• Edited by Wednesday, June 14, 2017 10:48 PM
• Marked as answer by Thursday, June 15, 2017 6:04 AM
Wednesday, June 14, 2017 10:45 PM

### All replies

• How are you filling the Planned Finish Date? Is it a formula or is it entered by hand?
Wednesday, June 14, 2017 2:29 PM
• If you are comparing the dates in their text format then you need to convert them to dates.

Sam Hobbs
SimpleSamples.Info

Wednesday, June 14, 2017 5:20 PM
• Use either DateValue or Int function to remove the time part. For example, perform the comparison for equality as follows:

DateValue([Planned Finish]) = DateValue([Finish]) or Int([Planned Finish]) = Int([Finish])

Both expressions compare only the date parts of the date information by ignoring the time parts.

Ismet Kocaman | eBook on Formulas

• Edited by Wednesday, June 14, 2017 10:48 PM
• Marked as answer by Thursday, June 15, 2017 6:04 AM
Wednesday, June 14, 2017 10:45 PM
• It's a date field

• Edited by Thursday, June 15, 2017 1:55 AM
Thursday, June 15, 2017 1:54 AM
• I didn't think so Sam.  The formula is:

IIf([Planned Project Acceptance] = ProjDateValue("NA"), "grey", IIf([Finish]>[Planned Project Acceptance], "red", "green"))

• Edited by Thursday, June 15, 2017 1:57 AM
Thursday, June 15, 2017 1:57 AM