DGRL Posted April 9, 2018 Posted April 9, 2018 Dear coders Excel if screwing around again and i am trying to find a nice solution for it for all of us When reading the date from excel i get back amound of days from a specific year 10-23-2017 ( 43030 ) IS there a LSP file who can calculate these days back into readable date? Quote
Stefan BMR Posted April 9, 2018 Posted April 9, 2018 There are many variations of the Julian Date. Excel uses JD-2415020. You can get the correct date from excel with this: (menucmd (strcat "m=$(edtime," (rtos (+ 2415020.0 43030)) ",MO-DD-YYYY)")) -> "10-23-2017" Quote
DGRL Posted April 10, 2018 Author Posted April 10, 2018 except for the formatting ( I can fix that in expensive way but I rather add ' to the excel cell that contains the date in order to keep the formatting ) this is perfect Thanks Quote
Lee Mac Posted April 10, 2018 Posted April 10, 2018 except for the formatting ( I can fix that in expensive way but I rather add ' to the excel cell that contains the date in order to keep the formatting ) Here is a reference for the edtime DIESEL function - you can change the 'picture' (currently "MO-DD-YYYY") to whatever you require. Quote
Roy_043 Posted April 10, 2018 Posted April 10, 2018 This may be of interest: https://msdn.microsoft.com/en-us/vba/excel-vba/articles/range-text-property-excel https://www.mrexcel.com/forum/excel-questions/51310-getting-formatted-cell-value-rather-than-raw-data-through-vb.html Quote
DGRL Posted April 11, 2018 Author Posted April 11, 2018 Thanks guys for the info I think I can work things out (issue I get 1 excel file with dates in it and I do not know the format Read out excel fill in txt strings in model format of date needs to remain the same So I need to read the format of the cell and apply that I can make something for that Quote
Lee Mac Posted April 11, 2018 Posted April 11, 2018 You should be able to obtain the plain text content of the Excel cell, as opposed to the value - see this example. Quote
DGRL Posted April 11, 2018 Author Posted April 11, 2018 Again out of this world Lee Mac comes with a piece of code I can use. :notworthy: :notworthy: :notworthy: #cadtutor please rename this emoticon from not worthy to worthy Quote
Grrr Posted April 11, 2018 Posted April 11, 2018 see this example. Basically from where I started learning on Excel scripting. Quote
DGRL Posted April 11, 2018 Author Posted April 11, 2018 I want to become an apprentice of Lee Mac and maybe in the near future I can call myself a programmer also Quote
rlx Posted April 11, 2018 Posted April 11, 2018 I want to become an apprentice of Lee Mac and maybe in the near future I can call myself a programmer also How about the Lee Mac University , has a nice ring to it , n'est pas? :-) Quote
Grrr Posted April 11, 2018 Posted April 11, 2018 I want to become an apprentice of Lee Mac and maybe in the near future I can call myself a programmer also First you learn how to LISP, then you learn from him how to LeeSP. Thats like switching from basic to advanced level. 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.