0

I've got a hard time converting float column value into timestamp in Postgress. Actually, in SQL it looks like this:

TIMESTAMP 'epoch' + "t1"."timestamp" * INTERVAL '1 second') at time zone 'UTC'

Could you help me to express the same with the Peewee ORM?

1 Answers1

0

Why not:

SELECT to_timestamp(t1.timestamp);

It looks like this would work... In peewee:

SomeModel.select(fn.to_timestamp(SomeModel.timestamp))
coleifer
  • 24,887
  • 6
  • 60
  • 75