Skip to content Skip to sidebar Skip to footer

Postgresql Cast Hexadecimal To Timestamp (when Migrating From Sql Server)

I have the following problem when parsing SQL Server insert queries to PostgresSQL. After making the necessary changes to the queries in order for the SQL statements to work, I hav

Solution 1:

This timestamp notation is specific for MSSQL. It has two parts:

  • date part - days since 1900-01-01
  • time part - with 1/300s precision

There is no automatic cast for this value in PostgreSQL. Exact solution you can find here: how to cast the hexadecimal to varchar(datetime)?

Post a Comment for "Postgresql Cast Hexadecimal To Timestamp (when Migrating From Sql Server)"