24-hour Format

Entries

Total Hrs (24-hour)

<aside> 💡 Original by hgrmty on Discord

</aside>

if(empty(prop("Start")) or empty(prop("End")), toNumber(""), round(((toNumber(slice(prop("End"), 0, 2)) - toNumber(slice(prop("Start"), 0, 2))) * 60 - toNumber(slice(prop("Start"), length(prop("Start")) - 2, length(prop("Start")))) + toNumber(slice(prop("End"), length(prop("End")) - 2, length(prop("End"))))) / 60 * 100) / 100)

AM/PM Format

Entries

Total Hrs (AM/PM)

<aside> 💡 Original by esrch on Reddit

</aside>

if(empty(prop("In")) or empty(prop("Out")), toNumber(""), round((toNumber(replaceAll(prop("Out"), ":.*", "")) % 12 * 60 + toNumber(replaceAll(prop("Out"), "(^.*:)|( .*)", "")) + if(test(slice(prop("Out"), length(prop("Out")) - 2), "pm|PM|Pm|pM"), 12 * 60, 0) - (toNumber(replaceAll(prop("In"), ":.*", "")) % 12 * 60 + toNumber(replaceAll(prop("In"), "(^.*:)|( .*)", "")) + if(test(slice(prop("In"), length(prop("In")) - 2), "pm|PM|Pm|pM"), 12 * 60, 0))) / 60 * 100) / 100)

<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1649d2f9-1b45-478a-86b4-341fbe27e06f/benny.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1649d2f9-1b45-478a-86b4-341fbe27e06f/benny.png" width="40px" /> By Ben • Latest • Was this helpful? Please consider buying me a coffee. Cheers!

</aside>