Assuming "obj" is an instance of a Model class for this table:

obj.jointime.date()

On Tue, Jun 14, 2016 at 8:52 AM, Galil <[email protected]> wrote:

> Hi,
>
> How can I convert this SQL query into a Django query?
>
> SELECT DATE(JoinTime) FROM table
>
> Please keep in mind that JoinTime is in datetime format and I want it to
> be date.
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1d6c122b-cf31-4cc4-b105-e9a6a9f6b344%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/1d6c122b-cf31-4cc4-b105-e9a6a9f6b344%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAD4ANxXm6MdYJsdLpaDT-yC3PTvhSfaEXyij%3De2LFLwb9T4E%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to