Temp password expiration in X hours after current time

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Temp password expiration in X hours after current time

Post by tford »

Going in circles in my mind about the formula to calculate a timestamp attribute to 48 hours after CURRENT_TIMESTAMP to set a temporary password expiration.

Anyone got it?
Tom - V8.8 build 3137 - MySql / PostGres
Rennur
Posts: 1191
Joined: Thu Mar 01, 2012 5:13 am
Location: Sydney, Australia

Re: Temp password expiration in X hours after current time

Post by Rennur »

TIME_ADD
Description:
Returns the timestamp resulting from adding/subtracting the specified number of hours to the specified timestamp
Parameters:
An expression producing timestamp and an expression producing a number to be added or subtracted (if the number is negative) to the timestamp
Example:
If  TIME_ADD (Account.OpeningTime), 4) = 07/04/2004 12:00 Then …
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Temp password expiration in X hours after current time

Post by tford »

Thanks Renur.

My rule:
SystemUser.PasswordTemp_Expires_ts=TIME_ADD(CURRENT_TIMESTAMP,48)

Thinking I should probably make the 48 a SystemSetting as well vs hard coding in the rule.
Tom - V8.8 build 3137 - MySql / PostGres
Post Reply