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

Two simple questions which should be available through Help, but I haven't been able to find anything.

1. Is there a way to format content within a formula? I need a cell that concatenates a properly-formatted date to some text, but I can't find any way to specify the date format.

2. In conjunction with #1, is there a function to return an entire date in external format rather than having to get the month, day, and year separately? All I've found is a way to convert a human date to an internal date.

Here's the background of what I'm trying to do, in case it's not all clear above. I'm using Calc to replicate a form produced by another system; the other system only lets me go out a certain distance in the future but my client wants it for a longer period. What I create won't be a perfect match, but it'll be close enough. For this particular job, mainly due to other formatting issues, Calc is a better choice than Writer.

The date appears several times on the form, so I naturally just want to enter it once. In two cases it appears after standard text that is centered in its cell. I build the cell formula as

    =CONCATENATE("my text",$r$2)

where R2 is the cell in which I've entered the date. The formula as written here returns the internal date, so I tried this one:

    =CONCATENATE("my text",MONTH($r$2),"/",DAY($r$2),"/",YEAR($r$2))

Unfortunately, this one gives me a single digit for the month and the day, and what I really want is MM/DD/YYYY. If I could just do this inline it would be a lot easier than having to then figure out how Calc will generate leading zeroes for me (which would also require inline formatting or a lot more embedded functions).

Any ideas how to simplify this?


To unsubscribe e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


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.