Post

2 followers Follow
0
Avatar

Today() function

I want to get the date difference for a particular date to todays' date. Its not allowing me with the below formula
DateDiff(todate($LastLogin),todate(today()),"d")

Please correct me where I am wrong.

Ahmadraza1 Answered

Please sign in to leave a comment.

1 comment

1
Avatar

Hi Ahmad,

Today() function is not available in the context of a formula based field. The best practice around that is to define a Today Custom Field on object level (in your use case the user level) and create a Scheduled Work Flow to update this fields on a daily basis (on active users, $State='Active').
Nevertheless, in your use case I suggest to create a Chart View (bar chart) on the People module with Login Date as the x-axis. This will allow to view which users (by clicking on each bar) logged on a specific time frame (weekly, monthly, quarterly).

Please let me know if it makes sense.

Thanks,
Tamir

Tamir Avital 1 vote
Comment actions Permalink