How can I add 2 hrs in time in SQL query ?
Application Type

Hi All,

I wanted to add the 2 hrs in my existing SQL query attribute (JourneyDate) and I'm using the function (SYSDATE+2) But It's not working here. Below is the select query

e.g : {Trip}.[FromDatetime]  + 2/24 as JourneyDate,

Is this the right way to add the time or is there any other way also to implement this functionality.



Hi @Prince K,

You can add duration to your column

{Trip}.[FromDatetime] + #duration(0,2,0,0)) as JourneyDate, 

The arguments of #duration are days, hours, minutes, seconds

Thanks, Aadhavan S

Hey Buddy,
You can achieve this by using below format


You can follow below link

If this helps you then please mark this as solution

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.