Forum Discussion

XeniaWatterson's avatar
XeniaWatterson
Qrew Trainee
3 years ago

Creating task with a specific due date

We have certain tasks that get created when new employees are hired.  Most have due dates that are calculated a few days after the start date, but we want to add tasks that will be due on September 1 or March 1 based on the start date (so if the Person is hired and task is created in September, October, November, December, January, or February the task will be due March 1.  If it is a March, April, May, June, July, or August hire will have a due date of September 1).  How would I write my formula to say if this is the start date, then this is the due date?  Thank you!

------------------------------
Xenia Watterson
------------------------------
  • You could try Month() function to find the month number of joining date, then if month is 12(Dec),1(Jan),2(Feb) define variable for start date accordingly.

    var number doj = month([Join Date]); 

    IF($doj = 12 or $doj = 1 or $doj=2 , [due]=X,
    if(

    and so on

    Making sense?
    ​​​

    ------------------------------
    Prashant Maheshwari
    ------------------------------
    • XeniaWatterson's avatar
      XeniaWatterson
      Qrew Trainee
      Thank you for the response.  I'm comfortable finding the specific month it is created, I don't know how to say, if it is this month then the due date is 09-01 for whatever year.  I've only ever done it as add however many days to the start date to figure out what the due date will be.

      ------------------------------
      Xenia Watterson
      ------------------------------
      • PrashantMaheshw's avatar
        PrashantMaheshw
        Qrew Captain
        After you find your DOJ logic with month , you can decide year with Year() logic ,

        For September, October, November, December)

        if month(doj)>8 then year(DOJ)+1 --> Next Year
        if month(doj)<=8 then year(DOJ) 


        ------------------------------
        Prashant Maheshwari
        ------------------------------