How to split the following date in javascript,
var date='2002-01-01';
The result should be as 20020101
Thanks..
var date = "2002-01-01";
Either of the following will get you what you want:
date = date.replace(/-/g, "");date = date.split("-").join("");If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With