Aftertouch Posted April 19, 2021 Posted April 19, 2021 Hello all, Im stuck at something hopefully very simple.... I got a Excel-file with a 'date' field, that shows '1-3-2021'. When i import my Excel file with LISP, it gets converted to: "44256") Is this some kind of conversion value? How can i get this to show the text "1-3-2021" again? Thanks in advance! Quote
mhupp Posted April 19, 2021 Posted April 19, 2021 (edited) Your lisp is pulling the cell.value from excel you need to pull the cell.text or convert all your dates in the excel sheet with this =TEXT(A1,"mm/dd/yyyy") change the month and day to how your country uses it. this might break any formulas you have in the spread sheet. so convert it back with =DATEVALUE(A1) Edited April 19, 2021 by mhupp Quote
Aftertouch Posted April 19, 2021 Author Posted April 19, 2021 Hi mhupp, Since the import excel is a general function, so i cannot change the 'cell.text' specific for this script. I am hoping that it is possible to convert the '4456' number back to a date in LISP.. I will look into the excel formulas too. Thanks for that tip! Quote
mhupp Posted April 19, 2021 Posted April 19, 2021 I don't know the math but the number is the # of days since 01/01/1900 Quote
eldon Posted April 19, 2021 Posted April 19, 2021 31 minutes ago, mhupp said: I don't know the math but the number is the # of days since 01/01/1900 I think that AutoCAD starts its dates nearly 7000 years before that. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.