Discussions

 View Only
  • 1.  Jinja Date functions

    Posted 10 days ago
    Edited by Christine White 10 days ago

    Hi,

    Is anyone aware of a Jinja equivalent "Workday" function?  I am working on scheduling start dates based on a start date and # of work days needed to complete.  

    Thank you!

     {{ a.Start_field + time.delta(days=a.workdays)}}

    Or a day of the week function?  i.e. if Saturday I can add 2 days if Sunday add 1 day?



    ------------------------------
    Christine White
    ------------------------------



  • 2.  RE: Jinja Date functions

    Posted 10 days ago

    I dont' believe QuickBase Jinja implementation has this atleast from the FAQ from their site.

    I would try to break the step in pipeline before i need the workday , update the record, let quickbase update the formula, copy the value & move forward .



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



  • 3.  RE: Jinja Date functions

    Posted 10 days ago
    Edited by Christine White 8 days ago

    This worked! 

    {% set nextdate = b.install_start_counter + time.delta(days=d.install_days) %}
    {% if nextdate.strftime('%A')=='Saturday' %}
    nextdate + time.delta(days=2)
    {% elif nextdate.strftime('%A')=='Sunday' %}
    nextdate + time.delta(days=1)
    {% else %}
    nextdate
    {% endif %}



    ------------------------------
    Christine White
    ------------------------------



  • 4.  RE: Jinja Date functions

    Posted 5 days ago

    Awesome ! Thanks for posting the solution .



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