Date: prev next · Thread: first prev next last
2020 Archives by date, by thread · List index


At 20:24 03/04/2020 -0400, Peter Dutton wrote:
Here's a formula I'm using
=DATEDIF($Begin_Here.$E$76,R4,"d")

The above formula returns the day number of the year where $Begin_Here.$E$76 [...] the date of 12/31/19

Cell R4 has the date 10 (which is Monday, February 10, 2020)

"10" is not a date - unless you mean the date that is internally stored as the number 10, which would be 9 January 1900! And that would be an error for the function, since the end date needs to be later than the start date.

"d" is the interval

Well, it's the unit in which you want the returned interval specified.

Wouldn't it be easier to use
=DAYS("2020-02-10";$Begin_Here.$E$76)
or just
="2020-02-10"-$Begin_Here.$E$76
?

Even more easily, abandon your "Begin_Here" value and try (with your 10 February 2020 date in R4)
=R4-DATE(YEAR(R4)-1;12;31)
This will produce the number 41 - providing the result cell is appropriately formatted.

It would be nice to have a / (forward slash) after the day number of the year which is returned by the above formula. How can this be done?

You can concatenate strings using the "&" operator, so just put &"/" after any of these formulae, such as
=R4-DATE(YEAR(R4)-1;12;31)&"/"
The numerical value 41 is implicitly converted to a string and concatenated with the slash to create the *string* 41/ .

I trust this helps.

Brian Barker


--
To unsubscribe e-mail to: users+unsubscribe@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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.