Skip to content

Commit 0df1eb7

Browse files
authored
Merge pull request #28 from vinraspa/dev
Update odsw.py
2 parents c4f8805 + 2a63df1 commit 0df1eb7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pyexcel_ods3/odsw.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ def write_row(self, array):
4444
seconds = cell.seconds % 60
4545
cell = "PT%02dH%02dM%02dS" % (hours, minutes, seconds)
4646
value_type = "time"
47+
if value_type == 'datetime':
48+
cell = "%04d-%02d-%02dT%02d:%02d:%02d" % (cell.year,
49+
cell.month,
50+
cell.day,
51+
cell.hour,
52+
cell.minute,
53+
cell.second)
54+
value_type = "date"
4755
elif value_type == "float":
4856
if cell > MAX_INTEGER:
4957
raise IntegerAccuracyLossError("%s is too big" % cell)

0 commit comments

Comments
 (0)