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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
MarkH
Helper I
Helper I

Date format issue in Power Bi Desktop in UK - some dates get converted to US format.

Here is the source data.

 

Just Source = DATATABLE (
    "StartDate", DATETIME,
    "EndDate", DATETIME,
    {
        { "16/03/2023 09:00", "16/03/2023 17:30" },
        { "16/03/2023 14:00", "16/03/2023 17:30" },
        { "17/03/2023 09:30", "17/03/2023 12:30" },
        { "16/03/2023 09:00", "17/03/2023 17:00" },
        { "16/03/2023 09:00", "20/03/2023 17:00" },
        { "16/03/2023 09:00", "20/03/2023 12:30" },
        { "16/03/2023 14:30", "20/03/2023 12:30" },
        { "17/03/2023 14:30", "20/03/2023 12:30" },
        { "16/03/2023 09:00", "27/03/2023 17:00" },
        { "02/03/2023 09:00", "27/03/2023 17:00" }
    }
)
 
Every thing is fine in the desktop  except the very last StartDate. 02/03/2023
This actually shows as 03/02/2023. All the other dates return UK format just fine.
Testing shows that if the first 2 digits are 01 to 12 it converts to US format.
I know you can change the locale in Power query but this is pure DAX.
To be clear, my locale is UK.
Why is it not consistent at keeping UK format?
How to fix it please.
 
Thanks
 
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MarkH ,

Here some steps that I want to share, you can check them if they suitable for your requirement.

Using DAX to create a calculate table:

 

Just Source = DATATABLE (
    "StartDate", DATETIME,
    "EndDate", DATETIME,
    {
        { "16/03/2023 09:00", "16/03/2023 17:30" },
        { "16/03/2023 14:00", "16/03/2023 17:30" },
        { "17/03/2023 09:30", "17/03/2023 12:30" },
        { "16/03/2023 09:00", "17/03/2023 17:00" },
        { "16/03/2023 09:00", "20/03/2023 17:00" },
        { "16/03/2023 09:00", "20/03/2023 12:30" },
        { "16/03/2023 14:30", "20/03/2023 12:30" },
        { "17/03/2023 14:30", "20/03/2023 12:30" },
        { "16/03/2023 09:00", "27/03/2023 17:00" },
        { "02/03/2023 09:00", "27/03/2023 17:00" }
    }
)

 

1.Select the field in the Modeling view, and then select the dropdown arrow under Format in the Properties pane.

vheqmsft_1-1703671024721.png

2.Once you've selected Custom from the Format dropdown menu, choose from a list of firstformat.

vheqmsft_0-1703671116860.png

3.Repeat the step1 and 2 and apply to another column

4.Final output

vheqmsft_1-1703671137443.png

Best Regards,

Albert He

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @MarkH ,

Here some steps that I want to share, you can check them if they suitable for your requirement.

Using DAX to create a calculate table:

 

Just Source = DATATABLE (
    "StartDate", DATETIME,
    "EndDate", DATETIME,
    {
        { "16/03/2023 09:00", "16/03/2023 17:30" },
        { "16/03/2023 14:00", "16/03/2023 17:30" },
        { "17/03/2023 09:30", "17/03/2023 12:30" },
        { "16/03/2023 09:00", "17/03/2023 17:00" },
        { "16/03/2023 09:00", "20/03/2023 17:00" },
        { "16/03/2023 09:00", "20/03/2023 12:30" },
        { "16/03/2023 14:30", "20/03/2023 12:30" },
        { "17/03/2023 14:30", "20/03/2023 12:30" },
        { "16/03/2023 09:00", "27/03/2023 17:00" },
        { "02/03/2023 09:00", "27/03/2023 17:00" }
    }
)

 

1.Select the field in the Modeling view, and then select the dropdown arrow under Format in the Properties pane.

vheqmsft_1-1703671024721.png

2.Once you've selected Custom from the Format dropdown menu, choose from a list of firstformat.

vheqmsft_0-1703671116860.png

3.Repeat the step1 and 2 and apply to another column

4.Final output

vheqmsft_1-1703671137443.png

Best Regards,

Albert He

MarkH
Helper I
Helper I

however, that creates the columns as text & when you convert them to datetime the original problem reappears 😪

MarkH
Helper I
Helper I

Fixed it by not using DATATABLE  and forcing a format. (You cannot format using DATATABLE)

 

Source2 = UNION (
    ROW ( "StartDate", FORMAT("16/03/2023 09:00", "dd/mm/yyyy hh:mm"), "EndDate", FORMAT("16/03/2023 17:30", "dd/mm/yyyy hh:mm") ),
    ROW ( "StartDate", FORMAT("16/03/2023 14:00", "dd/mm/yyyy hh:mm"), "EndDate", FORMAT("16/03/2023 17:30", "dd/mm/yyyy hh:mm") ),
    ROW ( "StartDate", FORMAT("17/03/2023 09:30", "dd/mm/yyyy hh:mm"), "EndDate", FORMAT("17/03/2023 12:30", "dd/mm/yyyy hh:mm") ),
    ROW ( "StartDate", FORMAT("16/03/2023 09:00", "dd/mm/yyyy hh:mm"), "EndDate", FORMAT("17/03/2023 17:00", "dd/mm/yyyy hh:mm") ),
    ROW ( "StartDate", FORMAT("16/03/2023 09:00", "dd/mm/yyyy hh:mm"), "EndDate", FORMAT("20/03/2023 17:00", "dd/mm/yyyy hh:mm") ),
    ROW ( "StartDate", FORMAT("16/03/2023 09:00", "dd/mm/yyyy hh:mm"), "EndDate", FORMAT("20/03/2023 12:30", "dd/mm/yyyy hh:mm") ),
    ROW ( "StartDate", FORMAT("16/03/2023 14:30", "dd/mm/yyyy hh:mm"), "EndDate", FORMAT("20/03/2023 12:30", "dd/mm/yyyy hh:mm") ),
    ROW ( "StartDate", FORMAT("17/03/2023 14:30", "dd/mm/yyyy hh:mm"), "EndDate", FORMAT("20/03/2023 12:30", "dd/mm/yyyy hh:mm") ),
    ROW ( "StartDate", FORMAT("16/03/2023 09:00", "dd/mm/yyyy hh:mm"), "EndDate", FORMAT("27/03/2023 17:00", "dd/mm/yyyy hh:mm") ),
    ROW ( "StartDate", FORMAT("02/03/2023 09:00", "dd/mm/yyyy hh:mm"), "EndDate", FORMAT("27/03/2023 17:00", "dd/mm/yyyy hh:mm") )
)
Dangar332
Super User
Super User

Hi, @MarkH 

use column tools 

in column tools choose format option and select    dd/mm/yyyy  or as you want 

 

Dangar332_0-1703074526285.png

 

I had tried that & unfortunately it doesn't work.

wierd 😫

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.