How to use and format the TIMESTAMP in javascript?

I think it is not. MongoDB data allows storing date as a date type. It is efficient storage, can be converted to any other forms (e.g., to string), has all the date/time related information, can be used for searching and sorting (compare with other dates), extract and use the different date fields (day, month, year, hour, min, sec, etc.) from it, perform date arithmetic, etc. All these operations can be applied using various query or aggregation operators (see Date Expression Operators).

1 Like