alexa
Facebook
Twitter
LinkedIn
Instagram
Whatsapp
Call Now
Quick Inquiry

Convert 2022-04-20T17:00:00.000Z to timepicker format in react.js ?

Convert 2022-04-20T17:00:00.000Z to timepicker format in react.js ?

you can simply new Date()

 new Date('2022-04-20T17:00:00.000Z'); 

like this to convert given timestamp into required format

then you can also extract only the part you want

 var d = new Date('2022-04-20T17:00:00.000Z');
console.log(d.getUTCHours()); // Hours
console.log(d.getUTCMinutes()); //Minutes
console.log(d.getUTCSeconds()); //Seconds

15 0
7

Write a Comments


* Be the first to Make Comment

GoodFirms Badge
GoodFirms Badge

Fix Your Meeting With Our SEO Consultants in India To Grow Your Business Online