Workflow Soluiton

 View Only
  • 1.  Getting date of a specific day after current date

    Posted Mar 25, 2012 11:51 AM

    Hi,

    I'm writing a workflow to send out an e-mail reminder about testing timescales.  As part of this e-mail I want to have a due date for testing displayed in it.  The due date is always the 2nd Sunday following the issuing of the e-mail. 

    Is there a way to do this in workflow??

    Example:

    E-Mail Sent on 15th March

    In the e-mail it would have a sign off date of 25th March

     

    Any help would be really appreicated :)



  • 2.  RE: Getting date of a specific day after current date
    Best Answer

    Posted Mar 25, 2012 12:25 PM

    This would be my "pseudoflow"... very much a brute force method

    1. Use Add Days component (under Date Handling in tree) to add 14 days to current date. This new result would be a "newdate"

    2. Use Day of Week Rule (under Date Handling) to see if "newdate" is a Sunday

    3. If Sunday, SUCCESS... "newdate" is a Sunday. if not, keep subtracting a day using Subtract Days component (under Date Handling) from "newdate", replacing "newdate with "newdate-1" each time, until "newdate" comes to a Sunday.

    Heres the flow below:

    If you need any more help, feel free to ask.



  • 3.  RE: Getting date of a specific day after current date

    Posted Mar 25, 2012 03:57 PM

    Ah, I was seriously overthinking this earlier.  Yes the Day of Week is just what I need and like you said work back from that to get to the Sunday.

    Thanks for spending time to reply with this info, really appreciated :)