Join the Stack Overflow Community
Stack Overflow is a community of 6.4 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I am trying to add a timestamp with an integer duration in my query.

QTrack.query.filter(
  func.dateadd(
    QTrack.start_time, QTrack.duration * func.interval('1 second')
  ) < datetime.datetime.now()
).order_by(
  QTrack.start_time.desc()
).limit(
  5
)

It is having issues on QTrack.duration * func.interval('1 second')

I am running Postgres as my db.

share|improve this question
    
and what is the problem?. – Vao Tsun yesterday

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.