Page 1 of 1

MONTH does not work in exported file

Posted: Sun Jan 05, 2025 11:03 pm
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.

Re: Formula does not work in exported file

Posted: Sun Jan 05, 2025 11:46 pm
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).

Re: Formula does not work in exported file

Posted: Sun Jan 05, 2025 11:54 pm
by FJCC
Please upload a spreadsheet file with some of the data. You can delete everything except the column with dates.

Re: Formula does not work in exported file

Posted: Mon Jan 06, 2025 2:38 pm
by victorocha
Segue o arquivo.

Conforme informado mesmo alterando o formato não funciona, toda a coluna está com o formato data.

Re: Formula does not work in exported file

Posted: Mon Jan 06, 2025 3:15 pm
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

Re: Formula does not work in exported file

Posted: Mon Jan 06, 2025 3:51 pm
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;"/";"-")))

Re: Formula does not work in exported file

Posted: Mon Jan 06, 2025 4:35 pm
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:

Re: MONTH does not work in exported file

Posted: Sat Jan 11, 2025 6:13 pm
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.