maqskywalker
asked on
date function formatting in jquery
Inside my jquery button click event i have this date variable
var d = new Date();
But when I display the value inside variable d the format looks like this:
Fri Sep 07 2018 15:35:50 GMT-0700 (Pacific Daylight Time)
How do i format it to this format: MM/DD/YYYY
var d = new Date();
But when I display the value inside variable d the format looks like this:
Fri Sep 07 2018 15:35:50 GMT-0700 (Pacific Daylight Time)
How do i format it to this format: MM/DD/YYYY
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
Open in new window
if you need more power on formatting date, you may use a lib like this one : https://momentjs.com/