This question has been flagged
2 Replies
4351 Views

Hello,

I want to write current datetime in excel report using pythons xlwt package.

But it shows the time in UTC format rather than my local timezone. So please help me to solve this problem.

Thanks in advance for your help!!!

Avatar
Discard
Best Answer

Hello Jinesh

you can use below code for get current datetime in excel report.


datetime.strftime(datetime.now(), "%d-%m-%Y")

Avatar
Discard
Best Answer
sheet.write(3, 1, str(date.today()))

Avatar
Discard