Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
5459 Vistas

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
Descartar
Mejor respuesta

Hello Jinesh

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


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

Avatar
Descartar
Mejor respuesta
sheet.write(3, 1, str(date.today()))

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
jun 23
4240
2
mar 17
4505
3
jun 25
7947
0
abr 24
1715
4
nov 23
5703