DateTimeFormat class should expose a parse method which will parse a string into a date object. A sample can be seen below
const dtString = '12/01/2001 11:10 AM';
const dt = DateTimeFormat.parse('dd/MM/yyyy hh:mm a');
In the above example dt should be the date object with date as 12th January 2001 and 11:10 AM
DateTimeFormatclass should expose aparsemethod which will parse a string into a date object. A sample can be seen belowIn the above example
dtshould be the date object with date as 12th January 2001 and 11:10 AM