Jump to content

Recommended Posts

Posted

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!

Posted (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 by mhupp
Posted

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!

Posted

I don't know the math but the number is the # of days since 01/01/1900

Posted
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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...