Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
AntoPasq
New Member

Fecha en español con formato mmm-yy convertirla a fecha

Hola! Tengo la siguiente tabla:

AntoPasq_0-1699538574471.png

 

La fecha está en español con formato mmm-yy y no lo reconoce para pasar a formato fecha. Cuál es la forma más simple convertir esto a fecha?

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @AntoPasq ,

You can create a calculated column as below to get it, please find the details in the attachment.

DateEN =
VAR DayOfTheDate = 1
VAR YearOfTheDate =
    VALUE ( RIGHT ( 'Table'[Mes], 2 ) )
VAR MidPortion =
    LEFT ( 'Table'[Mes], 3 )
VAR MonthOfTheDate =
    SWITCH (
        TRUE (),
        MidPortion = "Ene", 1,
        MidPortion = "Feb", 2,
        MidPortion = "Mar", 3,
        MidPortion = "Abr", 4,
        MidPortion = "May", 5,
        MidPortion = "Jun", 6,
        MidPortion = "Jul", 7,
        MidPortion = "Ago", 8,
        MidPortion = "Sep", 9,
        MidPortion = "Oct", 10,
        MidPortion = "Nov", 11,
        MidPortion = "Dic", 12,
        0
    )
RETURN
    DATE ( 2000 + YearOfTheDate, MonthOfTheDate, DayOfTheDate )

vyiruanmsft_0-1699871251800.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hi @AntoPasq ,

You can create a calculated column as below to get it, please find the details in the attachment.

DateEN =
VAR DayOfTheDate = 1
VAR YearOfTheDate =
    VALUE ( RIGHT ( 'Table'[Mes], 2 ) )
VAR MidPortion =
    LEFT ( 'Table'[Mes], 3 )
VAR MonthOfTheDate =
    SWITCH (
        TRUE (),
        MidPortion = "Ene", 1,
        MidPortion = "Feb", 2,
        MidPortion = "Mar", 3,
        MidPortion = "Abr", 4,
        MidPortion = "May", 5,
        MidPortion = "Jun", 6,
        MidPortion = "Jul", 7,
        MidPortion = "Ago", 8,
        MidPortion = "Sep", 9,
        MidPortion = "Oct", 10,
        MidPortion = "Nov", 11,
        MidPortion = "Dic", 12,
        0
    )
RETURN
    DATE ( 2000 + YearOfTheDate, MonthOfTheDate, DayOfTheDate )

vyiruanmsft_0-1699871251800.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.