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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bhmiller89
Helper V
Helper V

DATEDIFF Using An Actual Date as the start

I have columns that basically show duration. Except they are formatted as date/time. I was told that all of the values need to be calculated as a datediff off of '12/30/1899 12:00:00 AM'

 

Example: One of the columns is "RingTime" which is how long the phone rang before the call was picked up. The value is '12/30/1899 12:00:08 AM' so the phone rang for 8 seconds.

 

How do I create a custom column to calculate this? 

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @bhmiller89,

 

Based on my test, the formula(DAX) below should work in your scenario. Smiley Happy

Column 2 = DATEDIFF(DATE(1899,12,30)+TIME(0,0,0),Table1[RingTime],SECOND)

c1.PNG

 

Regards

View solution in original post

1 REPLY 1
v-ljerr-msft
Employee
Employee

Hi @bhmiller89,

 

Based on my test, the formula(DAX) below should work in your scenario. Smiley Happy

Column 2 = DATEDIFF(DATE(1899,12,30)+TIME(0,0,0),Table1[RingTime],SECOND)

c1.PNG

 

Regards

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.