Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
5602 Tampilan

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
Buang
Jawaban Terbai

Hello Jinesh

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


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

Avatar
Buang
Jawaban Terbai
sheet.write(3, 1, str(date.today()))

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
2
Jun 23
4349
2
Mar 17
4634
3
Jun 25
8087
0
Apr 24
1807
4
Nov 23
5844