Monolista: correggi date SAM e soglie delle picking list
This commit is contained in:
@@ -147,8 +147,8 @@ def _format_date(value: Any) -> str:
|
||||
return value.strftime("%d/%m/%Y")
|
||||
if isinstance(value, (int, float)):
|
||||
try:
|
||||
# SQL Server numeric datetime: CAST(datetime AS int), day 0 = 1900-01-01.
|
||||
return (datetime(1900, 1, 1) + timedelta(days=int(value))).strftime("%d/%m/%Y")
|
||||
# DATDOC is a SAM day serial; its fractional part is not a new day.
|
||||
return (date(1899, 12, 30) + timedelta(days=int(value))).strftime("%d/%m/%Y")
|
||||
except Exception:
|
||||
return str(value)
|
||||
text = str(value).strip()
|
||||
|
||||
Reference in New Issue
Block a user