# Erroneous result when subtracting dates

edited 03/20/22

Hi,

I'm trying to find the # of days between 2 dates that are in separate, formatted as dates. I'm using a simple formula =([Start date]28 - [Finish date]23, )

The result seems fine when displayed with no decimals, - but if the decimals are shown, the results are wrong.

If the dates in the two cells are the same, the result is -0.375 If the dates are 1 day apart the result is 0.626

Can anyone explain this and suggest a better formula.

thanks

Tim

Thank you for your suggestion Andree,

I can implement your suggested work around, but the inability to correctly calculate a simple operation is surprising. 😒

Tim

• ✭✭✭✭✭✭

I hope you're well and safe!

Can you describe your process in more detail and maybe share the sheet(s)/copies of the sheet(s) or some screenshots? (Delete/replace any confidential/sensitive information before sharing) That would make it easier to help. (share too, [email protected])

I hope that helps!

Be safe and have a fantastic week!

Best,

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

SMARTSHEET EXPERT CONSULTANT & PARTNER

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

W: www.workbold.com | E:[email protected] | P: +46 (0) - 72 - 510 99 35

Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

• thanks for your prompt reply Andree, I just shared the sheet with you - I high lighted 2 cells red that return a -0.375 after subtracting 2 cells with the same date - I suspect this may be related to the project settings - Currently set to an 8 hour day but if I change to 24 hour day, the formula returns a -1

Tim

• ✭✭✭✭✭✭

Happy to help!

I'll take a look and get back to you!

SMARTSHEET EXPERT CONSULTANT & PARTNER

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

W: www.workbold.com | E:[email protected] | P: +46 (0) - 72 - 510 99 35

Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

• thank you Andee, I appreciate your help

• ✭✭✭✭✭✭

Yes, you're correct!

It's the project settings that affect it, and I know that I've seen a post about it here in the Community, but I can't find it now.

As a possible workaround, you could add two so-called helper columns (date) that reference the original, and then the calculation will be "normal".

Make sense?

Would that work/help?

Remember! Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

SMARTSHEET EXPERT CONSULTANT & PARTNER

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

W: www.workbold.com | E:[email protected] | P: +46 (0) - 72 - 510 99 35

Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

Thank you for your suggestion Andree,

I can implement your suggested work around, but the inability to correctly calculate a simple operation is surprising. 😒

Tim

• ✭✭✭✭✭✭

Excellent!

You're more than welcome!

It's calculating correctly because of the Dependencies.

Remember! Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

SMARTSHEET EXPERT CONSULTANT & PARTNER

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

W: www.workbold.com | E:[email protected] | P: +46 (0) - 72 - 510 99 35

Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!