Apache OpenOffice (AOO) Bugzilla – Issue 124620
Doing math useing value of NOW()
Last modified: 2017-05-20 09:55:02 UTC
You can multiply (*) and divide (/) the output of NOW() but you cannot add (+) or subtract(-) to or from it. Robert Hays rhays@galvestonbay.net
multiply uses datevalue divide uses datevalue add adds to days subtract removes days AOO410m14(Build:9760) - Rev. 1585331 2014-04-07_04:11:07 - Rev. 1585379 Debian
> multiply uses datevalue > divide uses datevalue The result of multiply or divide a date would never be a senseful date. > add adds to days > subtract removes days Yes, if you add/subtract integers > 0. Adding/subtracting Values 0 < x < 1 change the time. (If you doing this in one formula like =NOW()+2 you have to format the cell with a date format.) This is the right defined behaviour. Where is the DEFECT?
Bug 1: No error message for what you call "never be a senseful date". Bug 2: No documented help for what you call "right defined behaviour". IMHO all four operations should result in error message. Now()+integer -> increase day ? Now()+decimal -> increase time ? "Assumption is the mother of all fuckups" :)
Your response to this issue is extreamly disappointing, to me it is a fault and always will be. When one cannot get the spread sheet to do ALL the math he needs doing then he just might as well do it with pencil & paper in the first place. Just one of the ways I was trying to use it is: I have a crop planted that is 45% ready to harvest, this would calcu. out to X# of hours left, by adding this x# of hours to NOW() I would have the exact time of day I would need to go harvest it, but this is not to be ,,,,, so sad. Sorry to have bothered you guys with this. Robert
Is your desired calculation successful with an older version of OpenOffice or a different spreadsheet program ?
(In reply to Robert Hays from comment #4) > Just one of the ways I was trying to use it is: > I have a crop planted that is 45% ready to harvest, this would calcu. out to > X# of hours left, by adding this x# of hours to NOW() I would have the exact > time of day I would need to go harvest it, but this is not to be ,,,,, so > sad. > Sorry to have bothered you guys with this. You have to look how a spreadsheet is working. Let in cell B1 you X# hours. So you have simply to calculate: =NOW()+B1/24 - because 1 day = 24 hours Format the cell with "DD/MM/YYYY HH:MM:SS".
reopened
(In reply to Edwin Sharp from comment #7) > reopened The more I ponder on this issue the more I realize that what I was trying to do is just not practical, mainly because of fractions and there is no format for Hours. There is a format for DAYS & TIME but not for Hours, minutes or seconds. Your suggestion: did the trick with the added benefit of the date. Let in cell B1 you X# hours. So you have simply to calculate: =NOW()+B1/24 - because 1 day = 24 hours Format the cell with "DD/MM/YYYY HH:MM:SS". Thanks ever so much for the help, maybe some day someone will add a format for HOURS just for the hell of it. Robert (Bob)
With all due respect, I just don't understand you. In comment 0 you talk about multiply and divide. In comment 4 you talk about hours addition. In comment 8 you talk about hours format. Next time, please discuss at: https://forum.openoffice.org/en/forum/index.php Please report issues here after reading: https://wiki.openoffice.org/wiki/QA/HowToFileIssue
Well crap, at 83 yr.'s I should be entitled to a little bit of confusion. <G> As far as I am concerned the issue is resolved, over and done with. Thanks Bob
I think error messages and better help are appropriate, but you are the boss :)