Last post Apr 13, 2016 02:26 AM by jmbishop
Apr 12, 2016 10:17 PM|jmbishop|LINK
I'm trying to post when the last time user logged in based on who is viewing the records current time zone, but I'm getting an error.
So @lastlogin.Submitted is the last time the user logged into the system
@firm.TImeZoneValue is the offset of the person viewing the records timezone. So for example it could return -6 for the mid west.
@lastLogin.Submitted.AddHours(@firm.TimeZoneValue).ToString("h:mm tt - MMM dd, yyyy")
This is the error I'm getting...
Apr 12, 2016 11:25 PM|rrrsr7205|LINK
Not being privy to your code and to the data types of the variables involved, my suspicion is that "@firm.TimeZoneValue" is some datatype other than double.
The DateTime.AddHours() method requlres a value of type double.
Apr 13, 2016 02:26 AM|jmbishop|LINK
Yes, I had to change it to a float.