Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
5686 Visualizzazioni

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
Abbandona
Risposta migliore

Hello Jinesh

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


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

Avatar
Abbandona
Risposta migliore
sheet.write(3, 1, str(date.today()))

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
giu 23
4439
2
mar 17
4723
3
giu 25
8173
0
apr 24
1848
4
nov 23
5934