Date format

Alex Wong 21 Reputation points
2021-05-14T11:08:52.36+00:00

Hi all,

my data original input the date format as text "dd.mm.yyyy", I have tried to change to Data type by using "Date" function, it came out as the format "m/dd/yyyy", and I also tried to use "Using Locale..." function to change the date format, no matter how I change the region (US, UK, HK....), the out come only came out as the format "m/dd/yyyy", but I need to have the format "dd/mm/yyyy", may someone could help me on this issue, thank you.

Thanks
Alex

Community Center Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Lz._ 9,016 Reputation points
    2021-05-14T12:28:34.433+00:00

    Hi @Alex Wong

    Could you try the following and if this doesn't work let me know what your System Regional Settings are

    let  
        // Table for demo  
        Source = Table.FromColumns(  
            { {"01.01.2021","01.02.2021"} },  
            type table [Date=text]  
        ),  
        //  
        ReplacedValue = Table.ReplaceValue(Source, ".", "/", Replacer.ReplaceText, {"Date"}),  
        ChangedType = Table.TransformColumnTypes(ReplacedValue, {{"Date", type date}})  
    in  
        ChangedType  
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.