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
Anonymous
Not applicable

time and date column in one

I have two different columns

In the first: Date

For example: 19.06.2018

 

In the second: Time

For example: 09:49:40

 

For my analysis I need the following in one collum: 19.06.2018 09:49:40

 

Can someone help me and tell me how can I combine these two collums?

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

You can use Transform > Merge Columns in Query editor, below is the M code and attached file with example.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMrTUMzDTMzIwtFDSUTKwtDIBIgOl2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [date = _t, time = _t]),
    #"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(Source, {{"date", type text}, {"time", type text}}, "en-GB"),{"date", "time"},Combiner.CombineTextByDelimiter(" ", QuoteStyle.None),"datetime"),
    #"Changed Type" = Table.TransformColumnTypes(#"Merged Columns",{{"datetime", type datetime}})
in
    #"Changed Type"

 

Or add a column with DAX expression.

datetime = 'Table DAX'[date] + 'Table DAX'[time]
Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

View solution in original post

3 REPLIES 3
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

You can use Transform > Merge Columns in Query editor, below is the M code and attached file with example.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMrTUMzDTMzIwtFDSUTKwtDIBIgOl2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [date = _t, time = _t]),
    #"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(Source, {{"date", type text}, {"time", type text}}, "en-GB"),{"date", "time"},Combiner.CombineTextByDelimiter(" ", QuoteStyle.None),"datetime"),
    #"Changed Type" = Table.TransformColumnTypes(#"Merged Columns",{{"datetime", type datetime}})
in
    #"Changed Type"

 

Or add a column with DAX expression.

datetime = 'Table DAX'[date] + 'Table DAX'[time]
Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

Anonymous
Not applicable

Thank you! @Mariusz 

Glad I could help! have a nice day @Anonymous 

 

Best Regards,
Mariusz

Please feel free to connect with me.
Mariusz Repczynski

 

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.

Top Solution Authors
Top Kudoed Authors