Currently, the question arises of obtaining dates from mongoose. This is my diagram:
var ActivitySchema = new Schema({ activityName : String , acitivtyParticipant : String , activityType : String , activityDate : { type: Date, default: Date.now } , activityPoint : Number });
By default, "mm.dd.yyyy" is used, so all the data that I have in the format "dd.mm.yyyy" defaults to Date.now.
Does anyone know if there is a function "format:" dd.mm.yyyy "that I can put directly in the Scheme? Any other ideas? (Really would not like to update all the data)
Thanks for any answers.
source share