how old a record is

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
User avatar
TandyServices
Posts: 15
Joined: 2015-12-07 22:59
Location: Largo, Florida
Contact:

how old a record is

Post by TandyServices » 2015-12-10 09:05

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..

User avatar
a.gneady
Site Admin
Posts: 1354
Joined: 2012-09-27 14:46
Contact:

Re: how old a record is

Post by a.gneady » 2015-12-10 21:34

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.
:idea: AppGini plugins to add more power to your apps:

User avatar
TandyServices
Posts: 15
Joined: 2015-12-07 22:59
Location: Largo, Florida
Contact:

Re: how old a record is

Post by TandyServices » 2015-12-10 21:38

Will give that a shot.. Thank you very much for all your help you are giving me..

Post Reply