Brian Dunning's FileMaker Custom Functions

DateAgeDisplay ( aTimeStamp )

Display the age of a timestamp in a facebook-style display in either seconds/minutes/hours/days

  Average rating: 4.6 (31 votes) Log in to vote

Daniel Wood   Daniel Wood
Digital Fusion Ltd
http://www.teamdf.com

Share on Facebook Share on Twitter

  Sample input:
DateAgeDisplay ( Get ( CurrentTimeStamp ) - 30 )
  Sample output:
30 seconds

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This function will display a condensed version of the age of a timestamp suitable for when you don't need to know the exact age. It will display the age in one of four formats: seconds / minutes / hours / days. Only one of the four formats is used depending on the age of the timestamp.

Examples:

1 second
35 minutes
6 hours
2 days ....

Handy if you use concepts like tasks, messages, notifications, alerts in your database, it quickly lets users see how old something is without bombarding them with confusing dates and timestamps.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.