How to add offset hours to Expression

  • 77Views
  • Last Post 27 August 2020
  • Topic Is Solved
0
votes
Jay Ong posted this 24 August 2020

Hi Support,

 

I am trying to add a datetime into the database using an expression. I have managed this using the GETDATE() function, but how do I add 8hrs so the datetime appears in my local time instead of GMT?


Kind regars
Jay

Order By: Standard | Newest | Votes
0
votes
Jay Ong posted this 24 August 2020

I tried this, but it is generating an error when I run the import: (DATEADD(HOUR,8,GETDATE()))

1
votes
Dmitriy Muzurov posted this 26 August 2020

Hello Jay,

Thank you for submitting a ticket with us.

Please try this variant:

DATEADD("Hour", 8, GETDATE())

We are looking forward to hearing from you, should you have any questions.

  • Supported by
  • Jay Ong
0
votes
Jay Ong posted this 26 August 2020

Hello Dmitriy, 

The variant worked. Perfect solution. Now I can see when the records import into the database in my local time. Saves me from having to add this function when I query the table in the db. Thank you! 

0
votes
Dmitriy Muzurov posted this 27 August 2020

Dear Jay,

You are very welcome.

We are glad to know the issue is resolved.

Should you have any questions, please submit us a new ticket.

Close