oatpp-postgresql icon indicating copy to clipboard operation
oatpp-postgresql copied to clipboard

How to use timestamp type?

Open xhthy00 opened this issue 2 years ago • 1 comments

I can't find the timestamp type, use the Uint64 type, but it dosen't wok,time value is wrong.

xhthy00 avatar Mar 13 '23 12:03 xhthy00

You can use <!! EXTRACT(epoch FROM "my_time_column")::bigint !!> in your query to get the timestamp as unixtime in a int64.

But getting it as std::chrono::time_point object or similar would be nice. Or something that the explicit cast is not necessary.

ygerlach avatar Nov 21 '25 13:11 ygerlach