Forum Discussion
4 Replies
Sort By
- MarkShnier__YouQrew #1 ChallengerHere is an example of a formula Date Field which will calculate an employees Next anniversary of their hire date. You could just adapt it for your purposes
var date HireDate=[Hire Date];
var date Datetest = Date(Year(Today()),Month($HireDate),Day($HireDate));
IF($DateTest >= Today(), $DateTest, AdjustYear($DateTest,1)
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------- KeithHendrickQrew MemberWorked perfectly. Thanks!
------------------------------
Keith Hendrick
------------------------------
- RyanBuschmeyer1Qrew TraineeI actually have this very thing in an app I built for another entity:
First, I built a report that displays "Birthdays (Next Month)", then I created a Quickbase Notification that sends the report to a specified user on the 15th day of each month.
The report is built off of the Birthday field (Formula Date) and an "Age (Now)" field (formula-numeric). "Birthdate" field below is a standard Date field.
Birthday Formula:AdjustYear([Birthdate], [Age (Now)]+1)
Age Now Formula://AGE and decimal months
// replace the [DOB] field with your date of birth field
var date DOB = [Birthdate];
var number Years =
Year(Today())-Year($DOB)
-
If(
Month(Today())<Month($DOB)
or
(Month(Today())=Month($DOB) and Day(Today())<Day($DOB)),1,0);
var number MonthsDifference = Month(Today()) - Month($DOB) ;
var number Months = If($MonthsDifference >= 0, $MonthsDifference, 12 + $MonthsDifference);
Round($Years + $Months/12,0.1)
Hope this helps.
------------------------------
Ryan Buschmeyer
------------------------------- KeithHendrickQrew MemberThanks, Ryan.
------------------------------
Keith Hendrick
------------------------------