osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fetch data from two dates query in python and mongoengine


Hi Mahesh,

Import Q from queryset.

from mongoengine.queryset.visitor import Q

ProcessedEmails.objects(Q(first_date) & Q(second_date))



On Fri, Aug 24, 2018 at 12:41 PM mahesh d <mahesh.tech88 at gmail.com> wrote:

> [image: Boxbe] <https://www.boxbe.com/overview> This message is eligible
> for Automatic Cleanup! (mahesh.tech88 at gmail.com) Add cleanup rule
> <https://www.boxbe.com/popup?url=https%3A%2F%2Fwww.boxbe.com%2Fcleanup%3Fkey%3D6shxV8TWSzohw7mx55CRTYGVUY%252F%252FUzgpidJKOL6DPTk%253D%26token%3Di2FjTl%252FO8mAwgqs0qhzOJeuhrkyh9QSqLpzpjt2QGdooZjs2O6iBTYSl%252BJH40Q4ohQceN%252FEvdtQjwBD89TS87YKbX1rR%252BK4ufxoZ7yN4tsFOubjkC91wlF7nlodh1CC8JJheu%252FEGxgpj4VWoEwhlKw%253D%253D&tc_serial=42465772179&tc_rand=687678035&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001>
> | More info
> <http://blog.boxbe.com/general/boxbe-automatic-cleanup?tc_serial=42465772179&tc_rand=687678035&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001>
> Hii
> My model like this
> class ProcessedEmails(Document):
>   subject = StringField(max_length=200)
> fromaddress =StringField(max_length=200)
>  dateofprocessing = StringField(max_length=25)
> How can find out the records between two dates ??
> Note: date of processing is string field
>  Mongodb database using .
> How to write the query in python by using mongoengine
>
> Thanks
> Mahesh D.
> --
> https://mail.python.org/mailman/listinfo/python-list
>