You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Date to number JS function not working as expected

Received Response
edited May 11, 2019 12:25PM in Integration 12 comments


I am using below JS function for convert date to number


I am using below  JS function for convert date to number  

In Browser it working and give a result as 11572923446000

But OIC provides NaN as a result.


Is any parser problem in Code?

Any default function is there convert date to number!


function dateToNumber(datetoNum){

  var NumberDate = Date.parse(datetoNum);

   return NumberDate; 

var dateVar = dateToNumber('11-05-2019 03:10:46 UTC')

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!