Skip to main content
Question

Jinja Date functions

  • September 16, 2023
  • 0 replies
  • 626 views

Forum|alt.badge.img+9

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
------------------------------

This topic has been closed for replies.

Forum|alt.badge.img+11

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
------------------------------

Forum|alt.badge.img+9
  • Author
  • Quickbase Alumni
  • September 16, 2023

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
------------------------------