跳至內容
選單
此問題已被標幟
2 回覆
5472 瀏覽次數

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!!!

頭像
捨棄
最佳答案

Hello Jinesh

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


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

頭像
捨棄
最佳答案
sheet.write(3, 1, str(date.today()))

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
6月 23
4249
2
3月 17
4518
3
6月 25
7960
0
4月 24
1719
4
11月 23
5732