Parse a String to a Date Object.

For parse a string to a date object we need format module.

function parseDateString() {
        // Assuming Date format is MM/DD/YYYY
        var initialFormattedDateString = "07/28/2015";
        var parsedDateStringAsRawDateObject = format.parse({
            value: initialFormattedDateString,
            type: format.Type.DATE
        });
return parsedDateStringAsRawDateObject;
}

Leave a comment

Your email address will not be published. Required fields are marked *