Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

date in mm/dd/yyyy format mongodb

db.cats.aggregate(
   [
     {
       $project: {
          _id: 0,
          formattedDate: { $dateToString: { format: "%m/%d/%Y", date: "$born" } }
       }
     }
   ]
)
Source by database.guide #
 
PREVIOUS NEXT
Tagged: #date #format #mongodb
ADD COMMENT
Topic
Name
7+7 =