<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a5a1e3ce-00fa-46e4-9a75-58c2aed9e8ce/Notion_Fundamentals_with_Thomas_Frank_-_Avatar_2021.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a5a1e3ce-00fa-46e4-9a75-58c2aed9e8ce/Notion_Fundamentals_with_Thomas_Frank_-_Avatar_2021.png" width="40px" /> The example database below uses the timestamp() function to determine which of two dates is the later one.

Created by Thomas Frank | Learn Notion Formulas | Notion Basics | Templates | Twitter

</aside>

Find Later Date

// Compressed
if(timestamp(prop("Date 1")) == timestamp(prop("Date 2")),"Date 1 and Date 2 are the same.",if(timestamp(prop("Date 1")) > timestamp(prop("Date 2")),"Date 1 is later than Date 2.","Date 2 is later than Date 1."))

// Expanded
if(
    timestamp(
        prop("Date 1")
    ) == timestamp(
        prop("Date 2")
    ),
    "Date 1 and Date 2 are the same.",
    if(
        timestamp(
            prop("Date 1")
        ) > timestamp(
            prop("Date 2")
        ),
        "Date 1 is later than Date 2.",
        "Date 2 is later than Date 1."
    )
)

© Thomas Frank