MONTH does not work in exported file

Discuss the spreadsheet application
Locked
victorocha
Posts: 2
Joined: Sun Jan 05, 2025 10:41 pm

MONTH does not work in exported file

Post by victorocha »

DeepL translation:
The MONTH function doesn't work in a spreadsheet exported from the company's system, but when I type in the date manually, the function works, but the spreadsheet has almost 2,000 rows, making it impossible to type in each date manually. Is it possible to correct this through some configuration or another function?

In the first few rows the format that comes with the spreadsheet doesn't accept the function and returns an error.
At the bottom, the manually entered date returns the desired response from the function, giving the month of the date.

I've tried changing the format of the value and it still doesn't work.

---------------------------
A função MÊS não funciona numa planilha exportada do sistema da empresa, porém quando eu escrevo a data manualmente a função funciona só que a planilha possui quase 2mil linhas tornando impossível digitar cada data de forma manual. É possível corrigir através de alguma configuração ou outra função?

Nas primeiras linhas o formato que já vem com a planilha e não aceita a função retornando erro.
Nas de baixo data inserida manualmente retornando a resposta desejada da função trazendo o mês da data.

Já tentei mudar o formato do valor e mesmo assim não funciona.
Attachments
Captura de tela 2025-01-05 174658.png
Captura de tela 2025-01-05 174658.png (2.09 KiB) Viewed 5263 times
Last edited by MrProgrammer on Mon Jan 06, 2025 9:48 pm, edited 2 times in total.
Reason: Edited topic's subject
OpenOffice 24.2 no Windows 11 Pro
User avatar
Hagar Delest
Moderator
Posts: 33629
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Formula does not work in exported file

Post by Hagar Delest »

Hi and welcome to the forum!

Please read the Survival Guide for the forum. This is an English-speaking forum. An no all caps (your initial title) please.
As a courtesy, I have added the translation of your post.

Further posting in Portuguese will lead to the locking of the topic.

Please upload a sample file.
It seems that your rows are formatted as text, thus not recognized as a date. Ctrl+F8 should show that.
You have to convert the dates to a valid format. Maybe replacing / by - would do the trick but not sure (hence the need of a sample file to test).
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
FJCC
Moderator
Posts: 9623
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Formula does not work in exported file

Post by FJCC »

Please upload a spreadsheet file with some of the data. You can delete everything except the column with dates.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
victorocha
Posts: 2
Joined: Sun Jan 05, 2025 10:41 pm

Re: Formula does not work in exported file

Post by victorocha »

Segue o arquivo.

Conforme informado mesmo alterando o formato não funciona, toda a coluna está com o formato data.
Attachments
Novo(a) Planilha OpenDocument.ods
(18.61 KiB) Downloaded 98 times
OpenOffice 24.2 no Windows 11 Pro
User avatar
DiGro
Posts: 224
Joined: Mon Oct 08, 2007 1:31 am
Location: Hoorn NH, The Netherlands

Re: Formula does not work in exported file

Post by DiGro »

Importou texto para os campos de data.

Utilize Procurar e Substituir para o corrigir:

Procurar por: . (um ponto)

Substituir por: &

Em Mais opções: selecione Expressões regulares

Prima Substituir tudo.

Está terminado

------------
You have imported text into the date fields.

Use Search and Replace to correct it:

Search for: . (a dot)

Replace with: &

Under More options: check Regular expressions

Press Replace all.

You're done
____________
DiGro

AOO 4.1.16 (Dutch) on Windows 11 64-bit. Scanned with Ziggo Safe Online (F-Secure)
User avatar
keme
Volunteer
Posts: 3791
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Formula does not work in exported file

Post by keme »

Also, for ISO date format Calc expects YYYY-MM-DD input (dash separator, not slash). To have straight conversion from the exported data:

Code: Select all

=MONTH(DATEVALUE(SUBSTITUTE(B2;"/";"-")))
Portugues:

Code: Select all

=MÊS(DATA.VALOR(SUBST(B2;"/";"-")))
User avatar
Hagar Delest
Moderator
Posts: 33629
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Formula does not work in exported file

Post by Hagar Delest »

Sorry guys but I lock the topic.
I'm OK with non-English users posting also in their native language. But they could at least do their homework and post the translation of their own messages.
:evil:
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
User avatar
MrProgrammer
Moderator
Posts: 5430
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: MONTH does not work in exported file

Post by MrProgrammer »

I saw your report, victorocha, complaining about the post on 2025-01-06 and dismissed it. The rules for this forum are that you must post in English. If you open a new topic and post in Portuguese again you will be banned from the forum. There are translation tools on the internet which you can use to translate your posts to English if you do not speak the language. We will not continue to provide those translations for you. It is your responsibility to do that.

Vi o seu relatório, victorocha, a queixar-se do post de 2025-01-06 e rejeitei-o. As regras deste fórum são que as mensagens devem ser enviadas em inglês. Se abrires um novo tópico e voltares a postar em português, serás banido do fórum. Existem ferramentas de tradução na Internet que podem ser utilizadas para traduzir as mensagens para inglês, caso não falem a língua. Não continuaremos a fornecer-lhe essas traduções. É da tua responsabilidade fazer isso.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Locked