Not sure what happened to the post?? Just saw it on lists, and all the quotes where somehow removed?
In the B2 line the d is suppose to be in double quotes? Here I took the info, and removed the comments, and changed the quotes to ~ characters. It also removed the spaces?? Did a test with the following: In cell A1 =int(now()) in cell A2 =A1+time(1,12,0) In cell B2 =Datedif($a$1,a2,~d~)f in cellC2 =A2-$A$1 in cell D2 = (A2-$A$1)-int(a2-$a$1) in cell E2 =DATEDIF($A$1,A2,~d~)~ days ~TEXT((A2-$A$1)-INT(A2-$A$1),~ H ~~hours~~ M ~~minutes ~~~) If spaces are removed again, this is the line with spaces replaced with _ =DATEDIF($A$1,A2,~d~)~_days_~TEXT((A2-$A$1)-INT(A2-$A$1),~_H_~~hours~~_M_~~minutes_~~__~) On 8 Jul 2020 at 3:12, Michael D. Setzer II wrote: From:Michael D. Setzer iimsetze...@gmail.com To:Michael tiernanmichael.tier...@gmail.com, users@global.libreoffice.org Date sent:Wed, 08 Jul 2020 03:12:21 +1000 Subject:Re: [libreoffice-users] Strange question on Macro?? (in Spreadsheet) Priority:normal Did a test with the following: In cell A1 =int(now()) in cell A2 =A1+time(1,12,0) In cell B2 =Datedif($a$1,a2,d)'get days diff in cellC2 =A2-$A$1'gets HH:MM:SS but hours is total in cell D2 = (A2-$A$1)-int(a2-$a$1)'gets the hours minutes seconds in cell E2 =DATEDIF($A$1,A2,d)daysTEXT((A2-$A$1)-INT(A2-$A$1),HhoursMminutes) Result is like 0 days 1 hours 12 minutes in e155 after copying7 days 16 hours 48 minutes Copied A2-E2 to A3 down to E155 The formula in E2 might do what you want?? Did have it in F2 with the additions of seconds, but found the numbers would get off at points with a second. Probable the rounding factor of second portion?? Hope that gives and ideal.Note thespacein E2 formula. Good Luck. On 7 Jul 2020 at 8:34, Michael Tiernan wrote: From:Michael tiernanmichael.tier...@gmail.com Subject:Re: [libreoffice-users] Strange question on Macro?? (in Spreadsheet) To:users@global.libreoffice.org Date sent:Tue, 7 Jul 2020 08:34:38 -0400 On 7/2/20 2:06 PM, Michael D. Setzer II wrote: I've been trying to take a formula that calculates the difference between to dates into years/months/days. I'll ask if anyone has a macro or formulae that would do almost the same thing but allow it to be expressed further out to includehoursand minutesI'd like to see it if possible. I have a running log of incidents and it has two sets of columns. First pair isStartandEndof power event. That calculation would be nice if I could express it as: ### Days, ## Hours, ## Minutes The second calculation, the one that I've been working on is the difference between the previousEndand the newStartand that I do need to express[# Year][# Months][## Days][## Hours] ## Minuteswhere the values of '0' wouldn't be shown (but that's a luxury right now) The 'datedif' function would work if it accepted the arguments for smaller measures such ash/m/s. Any suggestions? -- MCTMichael C Tiernan. http://www.linkedin.com/in/mtiernan Non Impediti Ratione Cogatationis Women and cats will do as they please, and men and dogs should relax and get used to the idea. -Robert A. Heinlein -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy