wharton / drf-excel

An XLSX spreadsheet renderer for Django REST Framework.
BSD 3-Clause "New" or "Revised" License
212 stars 40 forks source link

Format attribute not working on DateTimeField and DateField serializers #57

Closed darcivieira closed 2 years ago

darcivieira commented 2 years ago

Hey

With a DateField or DateTimeField serializers, I'm not able to use the format attribute to manipulate date to get my own output.

rptmat57 commented 2 years ago

I am going to fix the readme information which is not accurate, it is using the old format.

here is an example on how to use it (see openpyx formats)

column_data_styles = {
    'created_datetime': {
        'format': 'd.m.y h:mm'
    },
}
rptmat57 commented 2 years ago

@darcivieira please confirm that it works when you get a chance

willtho89 commented 2 years ago

No more response. Fixed readme is correct 👍