what is the type equivalent of postgresql "timestamp without time zone" in SQL Server?
would it be ok to use DateTime?
For new development you can use the datetime2
data type, not the "plain" datetime
. It stores a timestamp with no time zone, and lets you specify the precision that you need for your system.
To get the precision of 1 microsecond, which is the equivalent of timestamp without time zone
in PostgreSQL, you need to specify precision of 6 fractional digits, i.e.
datetime2(6)
See this answer for details on why Microsoft recommends using datetime2
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With