Skip to content

Commit 3c5d5b5

Browse files
Simplify datetime formatting by removing useless check
1 parent 054f27b commit 3c5d5b5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pandas/io/excel/_odswriter.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,8 @@ def _make_table_cell(self, cell):
9292
value = str(val).lower()
9393
pvalue = str(val).upper()
9494
if isinstance(val, datetime.datetime):
95-
if val.time():
96-
value = val.isoformat()
97-
pvalue = val.strftime("%c")
98-
else:
99-
value = val.strftime("%Y-%m-%d")
100-
pvalue = val.strftime("%x")
95+
value = val.isoformat()
96+
pvalue = val.strftime("%c")
10197
return (
10298
pvalue,
10399
TableCell(valuetype="date", datevalue=value, attributes=attributes),

0 commit comments

Comments
 (0)