Forum Discussion
DougHenning1
3 years agoCommunity Manager
This Jinja should format the report title (replace reportDate with your field name):
NOTE: Edited to fix quarter formula
------------------------------
Doug Henning
------------------------------
NOTE: Edited to fix quarter formula
{% set reportDate = time.now - time.delta(months=1) -%}
{% set year = reportDate.strftime('%y') -%}
{% set qtr = (reportDate.month/3) | round(method='ceil') | int %}
{{ "Report_Q%s%s_%s" | format(qtr, year, reportDate|date_mdy) }}
------------------------------
Doug Henning
------------------------------
PrashantMaheshw
3 years agoQrew Captain
absolutely amazing Doug ! On my basic testing on live parser
it's not able to parse
Below seem to work. What could I be doing wrong @Doug Henning
------------------------------
Prashant Maheshwari
------------------------------
it's not able to parse
reportDate|date_mdy
Below seem to work. What could I be doing wrong @Doug Henning
{% set year = reportDate.strftime('%y') -%}
{% set qtr = (reportDate.month / 3) | int -%}
{{ "Report_Q%s%s_%s" | format(qtr, year, reportDate.strftime('%Y-%m-%d')) }}
------------------------------
Prashant Maheshwari
------------------------------
- DougHenning13 years agoCommunity ManagerHi @Prashant Maheshwari, glad it was helpful! The filter `date_mdy` is a custom filter by Quickbase so it won't work in other environments like live parsers. Nice job of figuring out a workaround- you're becoming a Jinja master!
------------------------------
Doug Henning
------------------------------