Skip to content

Commit

Permalink
Merge pull request #70 from wfmexpert/fix_43662
Browse files Browse the repository at this point in the history
43662 date or datetime
  • Loading branch information
delchiv committed Mar 26, 2024
2 parents 59ae43d + 20fb7f7 commit 9197ae3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name='verme-logs',
version='1.28.40',
version='1.28.41',
packages=find_packages(),
include_package_data=True,
license='BSD License', # example license
Expand Down
5 changes: 4 additions & 1 deletion xlsexport/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,10 @@ def get_formatted_field(value, format, file_format):
try:
formatted_value = datetime.datetime.strptime(value, format)
except TypeError:
formatted_value = get_cell_date(value, file_format)
if isinstance(value, datetime.datetime) and format == '%Y-%m-%d':
formatted_value = value.date()
else:
formatted_value = get_cell_date(value, file_format)
return formatted_value
else:
return get_cell_date(value, file_format)
Expand Down

0 comments on commit 9197ae3

Please sign in to comment.