I have to store upto 3 millisecond digit in timestamp column.
I have two fixed column in each tables: createdDate,LastmodifiedDate.
While inserting data value of CreatedDate/LastmodifiedDate:
now() at time zone 'utc'
But it is storing 5 digit of millisecond.
I would like to store only 3 fractional digit of millisecond.
let me suggest which type of datatype is storing only 3 fractional digit of millisecond.
let me know if you have any solution.
Postgres allows you to specify precision(0 to 6) while casting to TIMESTAMP
See Docs
So, you could do
select (now() at time zone 'utc') :: timestamp(3)
Demo
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