Anyone how I can get db.Timestamp and unix epoch t...
# orm-help
o
Anyone how I can get db.Timestamp and unix epoch timestamp and not a string?
👀 1
p
i believe it depends on your db?
o
I am using postgress, I want to get a unixtimestamp and not a Date object
because it is being transformed to string when I send it as JSON response
r
Hi @Omri Katz 👋 Depending on your database, it might be possible to define a custom database function and specify it in your schema using
@dbgenerated
(docs).
o
I am using postgress db
r
Can you try using the custom database function and let me know how it goes.
v
👋 @Omri Katz - have you had a chance to try the custom database function? Let us know!