Share via

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

1 answer

Sort by: Most helpful
  1. Lz365 38,201 Reputation points Volunteer Moderator
    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  
    

    Was this answer helpful?


Your answer

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