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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
v-xinruzhu-msft
Community Support
Community Support

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

v-xinruzhu-msft
Community Support
Community Support

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors
Top Kudoed Authors