ceate excel for herd and livestock

This commit is contained in:
7nimor
2025-08-06 09:25:13 +03:30
parent 8d7af93498
commit 74ca5ba82a
2 changed files with 8 additions and 4 deletions

View File

@@ -308,6 +308,10 @@ def convert_str_to_date(string):
return datetime.strptime(string, '%Y-%m-%dT%H:%M:%S.%fZ').date()
except ValueError:
try:
return datetime.strptime(string, '%Y-%m-%d').date()
return datetime.strptime(string, '%Y-%m-%dT%H:%M:%SZ').date() # Added format without milliseconds
except ValueError:
return None
try:
return datetime.strptime(string, '%Y-%m-%d').date()
except ValueError:
return None