Difference in time
Apr 28, 2021
05:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 28, 2021
05:27 AM
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?
Solved! Go to Solution.
Labels:
- Labels:
-
Best Practices
-
Troubleshooting
ACCEPTED SOLUTION
Accepted Solutions
Apr 28, 2021
05:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 28, 2021
05:45 AM
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
2 REPLIES 2
Apr 28, 2021
05:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 28, 2021
05:45 AM
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
Apr 28, 2021
07:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apr 28, 2021
07:59 AM
Thanks a lot!
