Forum Discussion
JoelHickok
3 years agoQrew Cadet
I'm still looking for a solution for how to work with the ISO 8601 format in a Pipeline using Jinja, but for now I am just falling back on another solution. My alternative is to create a Formula field in the same table, and use a Formula to format the date timestamp as text. Then the Pipeline can access the text field and use that in the Jinja template for sending emails, etc.
------------------------------
Joel Hickok
------------------------------
------------------------------
Joel Hickok
------------------------------
- DougHenning13 years agoCommunity ManagerYou can use time.parse() to convert the string to a datetime object then format it:
{{ time.parse("2022-10-12T17:26:42Z").strftime("%a, %B %d") }}
Returns: Wed, October 12
Hope that helps!
------------------------------
Doug Henning
------------------------------- JoelHickok3 years agoQrew CadetDoug... you nailed it. Thank you!
time.parse() to the rescue.
The problem with Pipelines and Jinja is knowing which modules are available within the Jinja template language inside a Pipeline, as well as what filters are available versus inaccessible. I tried working with datetime, etc., but just never got around to time. I wish Quickbase had documentation that cast a wider net over what is possible. But this is a tricky task to document another language as it used in your environment.
As a side note, it does also work very well to have another field in your QB table that does any formatting for you, as you can leverage any of those features too. But I like to keep all my logic in the same place.
------------------------------
Joel Hickok
------------------------------