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?

Dave


--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to