Forum for Geeks

How to format Dates...
 
Notifications
Clear all

How to format Dates in JavaScript?

1 Posts
4 Users
0 Likes
79 Views
RoninX
Posts: 1
Topic starter
(@roninx)
New Member
Joined: 4 weeks ago

I'm able to get dates by javascript default new date feature. like const d = new Date();

It returns: "Sun Sep 04 2022 15:57:19 GMT+0530 (India Standard Time)"

How to convert it to 04/09/2022 or 4th September 2022?

Topic Tags
Share: