Page 1 of 1

how old a record is

Posted: 2015-12-10 09:05
by TandyServices
OK I would like to see if this can be done. I would like to make a field up called age. That field will be how old the record is. Lets say I just posted to the database a few seconds ago. That field would bring up: 23sec, or 8min, 3hrs, and even 2days.
I see it can tell you the age from DOB but can it be done for the age of post in sec, min, hours, and days?


Thank you very much for your help and be safe all..

Re: how old a record is

Posted: 2015-12-10 21:34
by a.gneady
You could use a datetime field and set its default value as the date and time of creation of the record. You could then use the same code for calculating age from DOB but use it with the creation date/time field.

Re: how old a record is

Posted: 2015-12-10 21:38
by TandyServices
Will give that a shot.. Thank you very much for all your help you are giving me..