Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Converting Odata to UTC comes up with strange date "Wed Dec 31 20:00:02 UTC - 0400 1969" Javascript

$
0
0

Hello,

So i'm trying to get a date from a field using Odata (javascript). Everytime I get it I'm converting it to UTC but it keeps returning the date "Wed Dec 31 20:00:02 UTC - 0400 1969". I don't know why. This is the code I'm using.

Note: waitingdatevalue has the date value from Odata.

var dt = waitingdatevalue.replace("/Date(", "").replace(")/","");
var dateValue = new Date(parseInt(dt, 10));

PLease help!


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>