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


At 16:20 19/08/2013 -0700, Graham Lovatt wrote:
Not sure if I'm doing something wrong, if there's a setting I haven't set or I've found a bug

I fear you are doing something wrong!

Libreoffice Calc
Program settings are >>Options>>Language Settings>>Languages
User interface 'English (uk)'
Date acceptance patterns 'D/M/Y;D/M;D-M'

And the problem is
In a cell (CF3) I have the date >> 01/09/2013 which is DD/MM/YYYY
In another cell I have =MONTH(CF3) this cell is formatted as 'date' 'MMM' and I expect the cell to show 'Sep' it actually shows 'Jan'
So it's showing the day as the month and not the month as the month

No, it's not showing the day as the month. You can see this if you change the date from 1 to 2 September: your result will still be "Jan", not "Feb".

You are doing too much work. When you extract the month using the MONTH() function, you get the result 9 (for September). So far so good. But you cannot simply display the month name by formatting this value as a date, since it is no longer a proper date value. As a date, the value 9 means nine days from day zero - probably 8 January 1900. You will see that "Jan" is the correct MMM display for this date.

Any ideas how to fix

Yes. The solution is simply to format *the original date value* (or a copy of it) as an MMM date. Alternatively, you could set up an array of text values - "Jan", "Feb", and so on - and then use your month integer as an index to retrieve the correct month name from the array.

I trust this helps.

Brian Barker


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

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.