I need help in parsing out the following data.
Data to parse:
2014-09-08 00:00:00:000
2014-09-15 00:00:00:000
2005-12-12 00:00:00:000
I have already created a piece of code to parse the month.
var dohMonth = jQuery(this.attr("ows_DOH").split('-')[1];
The above code will create the following output:
09
09
12
Now I need help creating a piece of code for parsing the actual day of the month.
If I use:
var dohDay = jQuery(this).attr("ows_DOH").split('-')[2];
It will create the following output:
08 00:00:00:000
15 00:00:00:000
12 00:00:00:000
The extra zeros (The time format) are what I do not need.
I would like it to just be:
08
15
12
Any suggestions on how I should go about this ?