Open emilzak opened 3 months ago
The dates in Excel are numbers with only a specific formatting. You can use the formulas.functions.date._int2date
function that converts the date serial_number
to (year, month, day)
. The formulas.functions.date._text2datetime
function that converts the text to (year, month, day)
.
Let me know if it is straightforward for you.
The problem I created two user-defined functions, BSDATE and BSNUMBER. BSDATE returns datetime.date and BSNUMBER returns int. Operations performed on numbers work well. Ops on dates fail with #VALUE!
I've attached the excel and python code.
Please look at D1 (Error) and D2 ( Success )
Python: 3.8 OS: macOS Sonoma
Here is the result of the calculation
Please advise, and thanks for your work!
333.xlsx
UPDATE 1: