Hi!
I have a problem I don´t understand, hope someone can help me.
I have created a report showing the users from a portal with their last login. I found the LastLoginDate from the aspnet_Membership table. But the timestamp in that table differences from my actual time on server. It shows time 2 hours backward from actual time. So my report shows uncorrect time.
When looking in DNN´s core user accounts, the timestamps shows correct local time. I have checked the SQL server time, and it is correct.
Why is it like this? A difference in membership table, and actual server time?
Can anyone give me advice how I could adjust my sql syntax to adjust time + 2 hours?
My sql syntax that I use is:
SELECT AU.UserName, AM.CreateDate, AM.LastLoginDate
FROM dbo.aspnet_Membership AS AM WITH (nolock) INNER JOIN
dbo.aspnet_Users AS AU WITH (nolock) ON AM.UserId = AU.UserId INNER JOIN
dbo.Users AS U WITH (nolock) ON U.Username = AU.UserName INNER JOIN
dbo.UserPortals ON U.UserID = dbo.UserPortals.UserId INNER JOIN
dbo.UserRoles ON U.UserID = dbo.UserRoles.UserID
WHERE (dbo.UserPortals.PortalId = 74) AND (dbo.UserRoles.RoleID = 293)
If anyone could give advice I would be very thankful
Rgds Petri