Originally Posted by felgall
First load it into a Date object (so as to make sure that it is an actual valid date/time string) and then extract just the pieces you want.
a fabulously unreliable approach... this:
var d=new Date("2013-01-25 22:31:55.809231")
gives NaN in FF and IE and 25 in Chrome... regExing it, as per Ali's suggestion would appear much more sensible