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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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