Hi,
I'm trying to get the time stamp of my users login in and out of my ERP system.
I'm using this code:
SELECT [User ID], [Client Computer Name], [Event Datetime],
CASE
WHEN [Event Type] = 0 THEN 'Logon'
WHEN [Event Type] = 1 THEN 'Logoff'
WHEN [Event Type] = 2 THEN 'Start'
WHEN [Event Type] = 3 THEN 'Stop'
WHEN [Event Type] = 4 THEN 'Close'
ELSE CAST([Event Type] AS VARCHAR)
END AS [Event Type]
FROM [Session Event]
ORDER BY [Event Datetime] DESC
When I pull out, the date and time comes out like this:
28/8/2021 2:26:13 am
Nothing wrong with it, except that we don't work during night time.
But all the timestamps are in the wee hours. It doesn't reflect accurately our working time which is 9am-6pm
i suspect its either the timeclock in the server is wrongly, but I have checked that the server time syncs accurtely as my laptop time.
Can anyone advise why is this happening?
Thank you!
Josh.