I have a string looking like so:
"2013/1/16"
Is there any way I could quickly convert it into date object in javascript, something like:
convertToDateTime("2013/1/16", "yyyy/MM/dd")
It's pretty simple:
var myDate = new Date("2013/1/16");
That should do the trick.
Have a look at the documentation for the Date object
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