-
-
Save sheldonhull/d1160bc765d93920a82a0c5ca528d5d5 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"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment