Tuesday, 10 September 2013

Datediff query in mongodb

Datediff query in mongodb

I am not a expert in Mongodb so stuck at one point. I have DTEnd column in
my collection where i store end date of an event . I want to fetch closing
soon events with criteria sysdate-DTEnd <2 could anybody let me know how
to fetch the same in mongodb . Sample schema is as below
{ CorporateId: null, CorporateName: 'Nuclues Software', Description:
'Basic AngularJS Training First Semeseter Guys', EndDateTime: Thu Sep 05
2013 00:00:00 GMT+0530 (India Standard Time), NominationCount: 0,
StartDateTime: Thu Sep 05 2013 00:00:00 GMT+0530 (India Standard Time),
Status: null, ViewCount: 22, _id: 52298b8c60df891c30e553ca, Address: {
ZipCode: '1212', City: '1212', State: '1212', StreetAddress: '1212',
NearestLandMark: '1212' }, Nominations: [], Technologies: [ { Name:
'AngularJS' }, { Name: 'Asp.net' } ] }

No comments:

Post a Comment