Why is the DATEONLY formula outputting future dates?

Any time stamp after 7pm will be counted for the following date. Please see snapshot below. The time stamp is auto generated when the user fills out a form.


Best Answer

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    It is because of timezones. You are going to need a formula that grabs the hour, searches for "PM" and then subtracts 1 for anything greater than 7pm.


    It will look something like this...


    =DATEONLY(Created@row) - IF(AND(FIND("PM", Created@row) > 0, VALUE(SUBSTITUTE(MID(Created@row, 10, 2), ":", "")) > 7), 1, 0)

Answers

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    It is because of timezones. You are going to need a formula that grabs the hour, searches for "PM" and then subtracts 1 for anything greater than 7pm.


    It will look something like this...


    =DATEONLY(Created@row) - IF(AND(FIND("PM", Created@row) > 0, VALUE(SUBSTITUTE(MID(Created@row, 10, 2), ":", "")) > 7), 1, 0)

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!