Appreciate you taking the time to read this and thank you in advance for your assistance.
I am currently working on generating a new Date object with the same format as the one returned by my API call for data retrieval.
My objective here is to establish a default date for comparison with dates received from the API.
The date format returned by my API is as follows: Please note that this format cannot be modified.
2018-07-12T14:20:13.8434451Z
In order to create a new Date object, I implement the following:
this.defaultdate = new Date();
Format shown:
Thu Oct 04 2018 12:11:13 GMT-0400 (Eastern Daylight Time)
It should be noted that this process must remain within my .ts file.
Is there a method to alter the default date format to match the format of my API response so that I can compare both dates effectively?
Your help is greatly appreciated.