dcla
Aug 22, 2024 8:59:57 AM

timestamp request

how to write this SQL Server query in Winsql: select REPLACE(CONVERT(VARCHAR, (DATEADD(S, IDLMTS/1000, '1-1-1970 00:00:00')), 121), ' ', 'T') from  table_name

with IDLMTS = epoch: 1714737618246
i would like to timestamp: 2024-05-05T14:00:18.246

thanks in advance for your help



Synametrics support engineer
Aug 26, 2024 9:56:41 AM

timestamp request

Hello,

WinSQL does not have any proprietary syntax. You must write your queries in the dialect supported by your back-end server. For example, if you're connecting to an MS SQL Server for the back-end, refer to https://learn.microsoft.com/en-us/sql/t-sql/functions/dateadd-transact-sql?view=sql-server-ver16 and for https://www.ibm.com/docs/en/db2-for-zos/12?topic=functions-add-days if you're connecting to a DB2 back-end.

Whatever script you type in WinSQL's interface is sent to the back-end as-is. Therefore, the back-end interprets your queries and takes the needed actions, not WinSQL.

 

Navigation

Social Media

Powered by 10MinutesWeb.com