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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
sgp1066
New Member

Elapsed time between hire date and today

I have a hire date column and would like to have a new custom column that has the formula:

 

Todays Date - Hire Date.

I can get this to work. Obviously I am using the field names and the columns have the same data type

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @sgp1066 

Based on your description, I create the following sample data, its data type is date.

vxinruzhumsft_0-1718675404896.png

 

Then create a custom column, it returns the days between hire date and today.

DateTime.Date(DateTime.LocalNow())-[Hire Date]

vxinruzhumsft_1-1718675455489.png

 

Then change its type to whole number.

Output

 

vxinruzhumsft_2-1718675502034.png

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

And you can refer to the following attachment.

 

View solution in original post

2 REPLIES 2
sgp1066
New Member

Thanks for the quick reply. I thought I was on the right track but got caught up in that whole dateTime.Date expression. Thanks also for the complete solution with the nice screen shots and explanations. 

-steve

Anonymous
Not applicable

Hi @sgp1066 

Based on your description, I create the following sample data, its data type is date.

vxinruzhumsft_0-1718675404896.png

 

Then create a custom column, it returns the days between hire date and today.

DateTime.Date(DateTime.LocalNow())-[Hire Date]

vxinruzhumsft_1-1718675455489.png

 

Then change its type to whole number.

Output

 

vxinruzhumsft_2-1718675502034.png

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

And you can refer to the following attachment.

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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

Top Solution Authors