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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Re: Combine Date and time column into datetime column in calculated column

Hi Team,

 

Could you please help me to write a dax to combine date column and time column into datetime column.

 

I applied Different dax functions but i am not getting proper formate

For Example

1) Date column(dd-mm-yyyy) and datatype is date

2) Time column(hh:mm:ss) and datatype is time

3) After combine Date column and Time column i am getting below

   DateTime

03-11-2019 07:38:22
19-12-2017 05:30:00

 

In the above table one value(MM-DD-YYYY hh:mm:ss) and second value(DD-MM-YYYY hh:mm:ss)

 

Any one please help me on this and this is very urgent issue.Issue with combine date and time columns.png

 

2 REPLIES 2
amitchandak
Super User
Super User

There are a few ways. But this what I think will work most of the time

Date in dd/mm/YYYY format

Time in hh24:mi:ss format

 

I create two formula and marked that as date time

 

Combine = mid(DD__MM__YY[Date],4,2) &"/"& left(DD__MM__YY[Date],2) & "/" & right(DD__MM__YY[Date],4) & " "& DD__MM__YY[ time]

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks for your prompt response. I tried using the syntax you suggested but unfortunately it didn't help.

Instead of desired format (19-12-2017 05:30:00), your solution gave the following result: (19/12/2017 12/19/2017).

 

Out of many other trial and error process, I finally used the following syntax to get desired result: 

Date: Old_ArrivalDate = IM_SR[ARRIVAL_TIME in GMT_New], Datetype: Date.
Time: Old_ArrivalTime = FORMAT(IM_SR[ARRIVAL_TIME in GMT_New],"hh:mm:ss"), Datatype: Time.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.