How to add hours in UTCNOW() and return the result as Date format

I want to know the date of another Timezone based on the given time.

Example:

User is in Timezone UTC+4 and local time is 11:40pm of 19-April-2024. What I want to achieve is to return the date and time stamp of UTC+8 timezone regardless of where the user is based.

The date I want to return is the date of UTC+8 timezone. In the above example, i should get the date 20-April-2024 03:40am as this is the date and time in the UTC+8 local time.

Thanks in advance!

 

 

Solved Solved
0 6 121
1 ACCEPTED SOLUTION

UTCNOW()+"008:00:00" should do the job with the initial value. Though you need to remember that the UTC() is actually coming from the user's device. If the app user changes his/her time in the device for example one hour before the real time, it affects the UTCNOW() as well.

View solution in original post

6 REPLIES 6
Top Labels in this Space