Skip to main content

I have created a calculated field to display the number of days since a user has logged in using: DATEDIFF ('day', [Login At (Timezone)], NOW()).

 

This works, generally, but there are seemingly random discrepancies that don't make sense. I don't know why or how to fix it. I have attached a screen shot with [Login At (Timezone)] expanded to show Year, Month, and Day of last login next to my calculated field (Days since last login). You can see in the red boxes where the dates of last login does not add up correctly to the days since last login. I also attached a screen shot of the calculated field formula (also typed out above).

 

This should be very simple and straightforward. Any ideas on why this is happening?

Thanks!

4 Antworten
  1. 10. Feb. 2022, 16:51

    Hi @Soumitra Godbole​ ,

     

    I am well, hope you are also. I tried TODAY() in place of NOW() but had the same results.

     

    The attached screen shot shows user logins from Feb 9th only.

     

    I expanded the Login date to include hours and minutes to see if that might reveal some issues. However, (see attached screen shot circled in red) there are user logins on Feb 9th that are literally only 10 minutes apart, but the calculated field has calculated them as 2 days apart! The other one (circled in blue) is 18 minutes apart but one is show as 2 days since login while the other is 3 days since login.

     

    The login date is in "date" format - the little calendar icon next to it (i.e., not a string or something else).

0/9000