Want to compare a date field to a static date

Options

I have a sheet that has both a date field and a system-generated date created field. I want to use the date field (Called "Actual Start") in this column formula to show the "Actual Start" date if that date is before July 30, 2022. Otherwise, I want the cell to be populated with the System-generated date created field. I can't seem to define how to do the compare of the Actual Start date field to the static July 30, 2022 date. Any help will be greatly appreciated.

Dr. Doug Williamson

Tags:

Answers

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Options

    You would need to use something like this:


    =IF([Actual Start Date]@row <= DATE(2022, 07, 30), [Actual Start Date]@row, DATEONLY(Created@row))

  • Dr. Doug
    Options

    Ahhh....the DATEONLY function is what I needed. I had to modify my logic a bit and this was the final formula used: =IF(DATEONLY([System Date Created]@row) <= DATE(2022, 7, 30), [Actual Start Date]@row, DATEONLY([System Date Created]@row)).

    The reason for this column formula was due to the fact that I imported a bunch of rows from another system so I couldn't use the system generated creation date for those entries. But, everything after July 30, 2022, the system generated creation date is serving as my creation date.

    Thanks, Paul, for your outstanding assistance! It's things like this that make Smartsheet such a great environment.

    Dr. Doug Williamson

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!