Forum Discussion
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
- Anonymous2 years ago
Hi sgp1066
Based on your description, I create the following sample data, its data type is date.
Then create a custom column, it returns the days between hire date and today.
DateTime.Date(DateTime.LocalNow())-[Hire Date]Then change its type to whole number.
Output
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.
2 Replies
- AnonymousNot applicable
Hi sgp1066
Based on your description, I create the following sample data, its data type is date.
Then create a custom column, it returns the days between hire date and today.
DateTime.Date(DateTime.LocalNow())-[Hire Date]Then change its type to whole number.
Output
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.
- sgp1066New 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