Forum Discussion

siac16's avatar
siac16
Regular Visitor
4 years ago
Solved

Wrong Date Format

Hi,

 

I'm having an issue with the date format of a calculated column.

It should be dd/mm/yyyy in a long format, for example, Thursday, 16 of December of 2021.

Unfortunately, for the first 12 days, Power BI takes the format to mm/dd/yyyy. So, for example, November 2th turns into February 11th.

 

The formula I'm using is: 

date2 = concatenate(right(Table_FACEBOOK_PAGE_DATA[periodo],2)&"/",concatenate(left(right(Table_FACEBOOK_PAGE_DATA[periodo],4),2)&"/",left(Table_FACEBOOK_PAGE_DATA[periodo],4)))

 

Where "Periodo" have the correct date in format yyyymmdd (20211102)

 

Do any of you have an idea of how to resolve the issue?

 

The image is an example of how it looks like right now. The days 1st, 2md, 12th, turns into months, (the 11th is still November) but the 13th, 14th, and 15th are in the correct format.

 

  • siac16 , Try like

    Date = date( left(Table_FACEBOOK_PAGE_DATA[periodo],4) , mid(Table_FACEBOOK_PAGE_DATA[periodo],5,2) , right(Table_FACEBOOK_PAGE_DATA[periodo],2))

2 Replies

  • siac16 , Try like

    Date = date( left(Table_FACEBOOK_PAGE_DATA[periodo],4) , mid(Table_FACEBOOK_PAGE_DATA[periodo],5,2) , right(Table_FACEBOOK_PAGE_DATA[periodo],2))

    • siac16's avatar
      siac16
      Regular Visitor

      Hi! it totally worked. Thank you so much