Forum Discussion
- _anomDiebolt_Qrew EliteRound Down
Int(Today() - Year([Empl Svc Dt]))
Round Up
Int(Today() - Year([Empl Svc Dt]) + 1) - QuickBaseCoachDQrew CaptainTry this. i suspect that Dan's formula will not work
This formula was for Age, but I changed it to be used for completed years of service.
var date EST = [Empl Svc Dt];
Year(Today())-Year($EST)
-
If(
Month(Today())<Month($EST)
or
(Month(Today())=Month($EST) and Day(Today())<Day($EST)),1,0)- StephanieHarrisQrew Assistant CaptainI am trying to do this however I don't need to know their actual years of service as today, only as of the date an incident was reported. Basically I need to know the years between Hire Date and Date Reported.
- QuickBaseCoachDQrew CaptainTry this
var date HireDate = [My Hire Date field];
var date IncidentDate = [My Incident Field];
Year($IncidentDate -Year($HireDate)
-
If(
Month($IncidentDateToday()) < Month($HireDate$EST)
or
(Month($IncidentDate) = Month($IncidentDate) and Day($HireDate <Day($IncidentDate),1,0) - StephanieHarrisQrew Assistant CaptainIt's giving me a syntax error
- _anomDiebolt_Qrew Elite> ... Dan's formula will not work
CORRECTED:
Round Down
Int(Year(Today()) - Year([Empl Svc Dt]))
Round Up
Int(Year(Today()) - Year([Empl Svc Dt]) + 1) - JeremiasBarrosoQrew MemberPerfect! Thank you,
- QuickBaseCoachDQrew CaptainDan,
So if they hire me on December 30th and the Vacation Policy is that I get 2 weeks vacation after 1 complete year of service, then on January 2nd, 3 days later, the your formula says I get my 2 weeks vacation. Sweet. I'd like to work for that Company. - _anomDiebolt_Qrew EliteYeah I am very liberal in that regard. Also you should be implementing your own 20% program to work on whatever you want irrespective of whether or not you company has a 20% program. Slack off.