196
rated 0 times
[
200]
[
4]
/ answers: 1 / hits: 15587
/ 9 Years ago, tue, march 17, 2015, 12:00:00
I have a mongodb set up and I'm storing date and time alongside other data. The problem is that when I receive the data back the date and time is in a strange format and I'm not sure how I can handle this with JavaScript or jQuery.
my schema:
var carSchema = mongoose.Schema ({
carType: String,
notes: String,
created: {type: Date, default: Date.now}
});
this is what I'm getting in the JavaScript object:
created: 2015-03-15T14:01:16.447Z
How can I convert this to Time and date?
Can anyone help please?
More From » jquery