spring data - Using Query to filter ISODate in mongodb -


i trying filter record in data base using following format , returns correct record

db.getcollection('users').find({"createdat" : new isodate("2016-09-22t09:28:45.494z")}) 

but when doing same spring-date mongodb , unable return data. using following code this

localdatetime odt = localdatetime.parse ( "2016-09-22t09:28:45.494z" , datetimeformatter.iso_date_time ) ;  queryobject.addcriteria(criteria.where("createdat").is(odt)); 

please let me know if doing wrong


Comments

Popular posts from this blog

html - How to custom Bootstrap grid height? -

javascript - pass values from mssql to views in node -

image - python get coordinates (pixels) of corresponding points from clicks -