149
rated 0 times
[
155]
[
6]
/ answers: 1 / hits: 47877
/ 7 Years ago, sat, march 18, 2017, 12:00:00
I tried to use PostgreSQL timestamp
datatype, but it throws an error
ERROR: date/time field value out of range: 1489849402536
The schema
create table times (
time timestamp not null,
);
JS code
`insert into times(time) values (${Date.now()})`
P.S. another option is to use bigint
but it seems like an overkill.
More From » postgresql