Last active
August 17, 2022 16:32
-
-
Save peteristhegreat/c3f419bace8c3a3ae353 to your computer and use it in GitHub Desktop.
Relative Date Time in Outlook and Excel (minutes ago, hours ago, days ago), like Gmail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Go to: | |
Ribbon > View > View Settings > Columns... > New Column... | |
Name: "Ago" | |
Type: Formula | |
Formula: | |
IIF( Now() - [Received] <1/24, MINUTE( Now()-[Received] ) & " minutes ago",IIF( Now()-[Received] <1, HOUR( Now()-[Received] ) & " hours ago",IIF( Now()-[Received] <31, INT( Now()-[Received] ) & " days ago", "months ago"))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
E2 | |
=NOW()-5/1440 # 5 minutes ago | |
=NOW()-0.5 # 12 hours ago | |
=NOW()-1.1 # 1 days ago | |
=NOW()-40 # months ago | |
=IF(E2<1/24,CONCATENATE(MINUTE(E2)," minutes ago"),IF(E2<1,CONCATENATE(HOUR(E2)," hours ago"),IF(E2<31,CONCATENATE(INT(E2)," days ago"), "months ago"))) |
Awesome. Glad it was useful.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you for doing this. I was looking for a formula, and this was a great time saver for an outlook field showing time like this