Open kevin-lxh opened 8 years ago
I defined a datetime field
modifiedDate: {type: 'date', time: true, required: true},
save an item
item.modifiedDate = new Date(); item.save(...);
find the item
Item.get(..., function(err, item) { console.log(item.modifiedDate.getMilliseconds()); // will print '0' });
I have altered the column to TIMESTAMP type in MySQL level, and it can return milliseconds now. How to define a TIMESTAMP field program programmatically ?
You will likely need to add a custom type.
I defined a datetime field
save an item
find the item