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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

Power Query: Remove TimeZone info

hi,

 

When I use this in my Power Query:

 

 

[createdon] + #duration(0,10,0,0)

 

I get a value that is returned as type 'Any'. The value looks like :

 

4/08/2018 6:45:24 AM +00:00

 

How do I convert this to DateTime in a single line in Power Query without adding another column, splitting the date time value to a text and then converting it Date Time?

4 REPLIES 4
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous ,

Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered to close this topic?

 

Regards,

Daniel He

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

Hi,

Thanks for getting back to me.

 

Not resolved.

 

At the moment I have a long winded bunch of steps that will split a text date time field by the '+' delimiter and then remove the rest of the unwanted columns - hardly an elegant solution.

 

   #"Added CreatedOnAEST" = Table.AddColumn(#"Changed Type", "CreatedOnAEST", each if DSTQuery([CreatedOnUTC]) = 1 then [createdon] + #duration(0,10,0,0) else [createdon] + #duration(0,11,0,0)),
    #"Split Column by Delimiter" = Table.SplitColumn(Table.TransformColumnTypes(#"Added CreatedOnAEST", {{"CreatedOnAEST", type text}}, "en-AU"), "CreatedOnAEST", Splitter.SplitTextByDelimiter("+", QuoteStyle.Csv), {"CreatedOnAEST.1", "CreatedOnAEST.2"}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"CreatedOnAEST.1", type datetime}, {"CreatedOnAEST.2", type time}}),
    #"Removed Columns1" = Table.RemoveColumns(#"Changed Type1",{"CreatedOnAEST.2"}),
    #"Renamed Columns1" = Table.RenameColumns(#"Removed Columns1",{{"CreatedOnAEST.1", "CreatedOnAEST"}})
Anonymous
Not applicable

So is it possible to put this in a function and then call it Power Query?

v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous ,

Could you have just tried to change the data type to "Date":

1.PNG

Regards,

Daniel He

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

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.