Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Formula 1

Status
Not open for further replies.

blairclw

Technical User
Mar 1, 2005
38
0
0
US
I have a report that shows me the employees HIREDATE. What I would like is to be able to only pull employees who's anniversary date is for the current month.....
{EmployeePos_Stat_Curr.LastHireDate}
 
Sorry I copied over the other one I was using. This is what I have in there now and it still rounds the months up to one year. Here is what it looks like.

NAME POSITION HIRE DATE YEARS OF SERVICE
Ima Test Job-Position 9/28/2004 Year 1

Years of service should be Months 11 since September has not occured yet.


if Datediff ("yyyy",({EmployeePos_Stat_Curr.LastHireDate}), CurrentDate) < 1 then
"Months "& Datediff ("m", {EmployeePos_Stat_Curr.LastHireDate}, CurrentDate)
else
"Years "& Datediff ("yyyy", {EmployeePos_Stat_Curr.LastHireDate}, CurrentDate)
 
strange but this actually worked in a differant report. Not sure why it doesn't work in the one report but I'll figure it out. Thanks for all yall's help.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top