如果我将日期作为日期时间存储在mongodb中,如何在json中显示日期?

What would be the type of the variable returned if the type of variable in mongodb is datetime?

When I convert it into json, what will be displayed? Will it be a large number like unix time stamp or what?

Best to use mongos native JavaScript Date objects.

You can convert date objects to and from Unix timestamps using 'getTime()' method or 'Date(milliseconds)'

Remember the JavaScript Date object is measured in milliseconds due to the the Unix epoch.

The documentation says it's a UTC DateTime. So expect it to be a string such as: 2010-10-28T23:07:11Z