Hi All
I am using getLastLoginDateTime function which is in the below plugin
Get Last Successful Login Details
But facing weird issue.
below are the code snippet
It is working fine without typecase but while typecast it is showing errorNote :- loginDateTime has date and time data type and it is not working for 2-3 users and for rest it is working fine even while typecast.
Discussion posts and replies are publicly visible
Problem is with what getlastlogindatetime() function is returning. Its returning time in 24 hour format but for some reason, it is appending AM/PM after each result as 24 hour time format is represented without AM/PM.
That's why it couldn't be converted to datetime. So, it will throw error if user's login time is at or after 1 pm. One solution would be to convert 24 hour time to 12 hour.
yes I checked those users who login after 1 pm , I am facing issue on those users only