Forum Discussion
DougHenning1
3 years agoCommunity Manager
You 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
------------------------------
{{ time.parse("2022-10-12T17:26:42Z").strftime("%a, %B %d") }}
Returns: Wed, October 12
Hope that helps!
------------------------------
Doug Henning
------------------------------
JoelHickok
3 years agoQrew Cadet
Doug... 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
------------------------------
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
------------------------------