I have the following sql query:
The data in the (timestamp) and (loggedin) fields are in seconds and I'm trying to convert them to date and time. When I try to run this query I get this error:
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near '-'.
and I know that it's because of the syntax of my query. Can anyone please tell me the best way to re-write this query to get the results that I am looking to get.
Thank you
Doug
Code:
SELECT [Employees].name, [Employees].Employeenumber, Convert ([Timestamp]-([LoggedIn]/1000)/60))/1440+1,"mm/dd/yy"as [DATE], FROM Employees INNER JOIN mOpInterval ON [Employees].Loginname1 = mOpInterval.Opname
Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near '-'.
and I know that it's because of the syntax of my query. Can anyone please tell me the best way to re-write this query to get the results that I am looking to get.
Thank you
Doug
Comment