CONCATENATE for DATE simply not working...

getting error message for this function:

TEXT(
CONCATENATE([dia do vencimento], "/",
MONTH(TODAY()), "/",
YEAR(TODAY())),
"dd/mm/yyyy"
)

"TEXT function with two arguments requires a temporal type and text representing a date format".

If i use it without the "dd/mm/yyyy" to indicate the format, it works, but the date comes inverted (don't ask me why". 

I'm getting "1/09/2024". I believe the 09 comes from the [dia do vencimento], which is, indeed, the 9th, but it's clearly inverting the numbers.

I'm from brazil, so we use dd/mm/yyyy. My chrome language is set to english UK and I'm using tables from the appsheet database. EVERYTHING is set correctly to my location (sao paulo - brazil), both in the appsheet database info and the table settings in appsheet.

Can anyone help with this? I mean, I know dates are a nightmare to work with on any programming situation, but I honestly can't understand what is going on here...

 

edit: I've looked in the "test" option and, to my surprise, EVERYTHING is EXACTLY as it should be. 

the expression returns "09/01/2024".

kcds_0-1705609224490.png

Also, in all other parts of my app, the date is being displayed in the dd/mm/yyyy format.

 

0 3 487
3 REPLIES 3

Try to use..

TEXT(
CONCATENATE(MONTH(TODAY()),"/",[dia do vencimento], "/",
YEAR(TODAY())),
"dd/mm/yyyy"
)

hello! thanks for your reply, mate! I've tried with no success. Ive also tried changing the "/" for "-", but the expression does not support the format... I don't get it...

 

kcds_0-1705613932076.png

 

Could you try

TEXT(

DATE(
CONCATENATE(MONTH(TODAY()),"/",[dia do vencimento], "/",
YEAR(TODAY()))),
"dd/mm/yyyy"
)

or try

DATE(CONCATENATE([dia do vencimento],  "/", MONTH(TODAY()), "/",
YEAR(TODAY())))

Top Labels in this Space