خرید بک لینک

Vote count: 0

I am having trouble changing the date format of date column in the dataframe i created using Xlsxwriter. The current format is 3/31/2016 12:00:00 AM, which i thought python is reading a date and adding a time to it. I would like the format to simply be dd/mm/yyyy with know time associate with it for all of column A.

Here is my code:

date_format= workbook.add_format({'num_format': 'mmm d yyyy'})
date_time= dt.datetime.strftime("%m/%d/%Y")
worksheet.write_datetime(0,0, date_time, date_format)

The error message i get is : TypeError: descriptor 'strftime' requires a 'datetime.date' object but received a 'str'

asked 12 secs ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 6 شهريور 1395 ساعت: 1:39

صفحه بندی