Revolving around the core of technology
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
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.