cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Difference in time

Mr_Henry_M
14-Alexandrite

Difference in time

Hi! I have a field of the DateTime type in the Grid, where the time is +4 compared to mine. How can I remove this difference?

1 ACCEPTED SOLUTION

Accepted Solutions
yhan
17-Peridot
(To:Mr_Henry_M)

Hi @Mr_Henry_M,

 

You can refer to  below js code:

//convert date to ms in my time zone

var myTime = Date.parse(originalDate) - 4*60*60*1000;

//convert ms to date

var newDate = new Date(myTime);

 

Then you can use the new date parameter in your service 

 

Thanks,

/Yoyo

 

View solution in original post

2 REPLIES 2
yhan
17-Peridot
(To:Mr_Henry_M)

Hi @Mr_Henry_M,

 

You can refer to  below js code:

//convert date to ms in my time zone

var myTime = Date.parse(originalDate) - 4*60*60*1000;

//convert ms to date

var newDate = new Date(myTime);

 

Then you can use the new date parameter in your service 

 

Thanks,

/Yoyo

 

Mr_Henry_M
14-Alexandrite
(To:yhan)

Thanks a lot!

Top Tags