【发布时间】:2022-11-30 21:03:38
【问题描述】:
I have a queryset like:
qs = MyModel.objects.filter(name='me').values_list('activation_date')
hereactivation_dateisDateTimeFieldin models. When I download excel sheet from this qs I am not getting activation date instring format.How can I convert this field('activation_date') in string or how to typecast it in qs?
【问题讨论】:
-
you are missing
flat=True
标签: django python-2.7 django-models