Adjust dates in Quickbase Pipelines using Jinja
Get the FREE Jinja Date & Time Cheat Sheet https://www.quickbasejunkie.com/jinja
Relative dates are used all the time, so why not use them in Pipelines!
For example, add a task to a project that has a due date of 2 days from the project start date.
Or set a next payment due date for the first of the month following receipt of this month's payment.
Or maybe you just need to set the end time for a meeting 1 hour after the start.
By adding Jinja to your Pipeline, you can take an initial date or date/time value and derive a new 'adjusted' time value.
With 2 Jinja functions, it's possible to...
㊙️ Add or subtract days, months, or years from today
㊙️ Add or subtract days, months, or years from another date
㊙️ Add or subtract hours, minutes, or seconds from any date/time
㊙️ Replace one or more values in a date with a specific month, day, or year
㊙️ Replace one or more values in a time with a specific hour, minute or second
The Jinja Functions
time.delta()
㊙️ Used to offset a date/time value by a specified amount of time, such as hours, days, or months.
.replace()
㊙️ Replaces the day, month, or year in a date value or hour, minute, and second in a date/time value.
A Few Examples
Add 3 hours to the Current Time
{{ time.now + time.delta(hours=3) }}
With an adjustment for timezone:
{{ (time.now|timezone('America/New_York')) + time.delta(hours=3) }}
Add 3 days to a Start Date field from step A in the Pipeline
{{ a.start_date + time.delta(days=3) }}
Adjusting for both days and months:
{{ a.start_date + time.delta(months=2,days=3) }}
Add 1 month to a Due Date field and set the date to the 1st
{{ a.due_date.replace(day=1) + time.delta(months=1) }}
Be sure to watch the video for more examples and tips.
These date/time adjustments are sure to come in handy!
🎦📚😃 Get more training from Quick Base Junkie https://quickbasejunkie.com/training
RESOURCES:
Get the Intro to Jinja for Pipelines course: https://www.quickbasejunkie.com/intro-to-jinja
Learn More About Jinja: https://www.quickbasejunkie.com/blog/what-is-jinja
Set the time zone, using Jinja: https://www.quickbasejunkie.com/blog/how-to-jinja-time-zone
Feeling like a Junkie? Subscribe Now!
https://www.quickbasejunkie.com/sign-up
LET'S CONNECT!
LinkedIn ➤ https://linkedin.com/company/quickbasejunkie/
Instagram ➤ https://instagram.com/quickbasejunkie/
Facebook ➤ https://fb.me/quickbasejunkie
Quick Base Junkie ➤ https://quickbasejunkie.com
Learn More About Quickbase @ https://quickbase.com
© Quick Base Junkie
COPYRIGHT NOTICE: The content, title, description, and specific ways in which the information in this video is organized, documented, and presented are the creative property of Quick Base Junkie. For use in any medium attribution is required, for questions or use permission, contact me @ https://quickbasejunkie.com/contact.
Quick Base Junkie is unofficial and not affiliated with Quickbase Inc.
Видео Adjust dates in Quickbase Pipelines using Jinja канала Quick Base Junkie
Relative dates are used all the time, so why not use them in Pipelines!
For example, add a task to a project that has a due date of 2 days from the project start date.
Or set a next payment due date for the first of the month following receipt of this month's payment.
Or maybe you just need to set the end time for a meeting 1 hour after the start.
By adding Jinja to your Pipeline, you can take an initial date or date/time value and derive a new 'adjusted' time value.
With 2 Jinja functions, it's possible to...
㊙️ Add or subtract days, months, or years from today
㊙️ Add or subtract days, months, or years from another date
㊙️ Add or subtract hours, minutes, or seconds from any date/time
㊙️ Replace one or more values in a date with a specific month, day, or year
㊙️ Replace one or more values in a time with a specific hour, minute or second
The Jinja Functions
time.delta()
㊙️ Used to offset a date/time value by a specified amount of time, such as hours, days, or months.
.replace()
㊙️ Replaces the day, month, or year in a date value or hour, minute, and second in a date/time value.
A Few Examples
Add 3 hours to the Current Time
{{ time.now + time.delta(hours=3) }}
With an adjustment for timezone:
{{ (time.now|timezone('America/New_York')) + time.delta(hours=3) }}
Add 3 days to a Start Date field from step A in the Pipeline
{{ a.start_date + time.delta(days=3) }}
Adjusting for both days and months:
{{ a.start_date + time.delta(months=2,days=3) }}
Add 1 month to a Due Date field and set the date to the 1st
{{ a.due_date.replace(day=1) + time.delta(months=1) }}
Be sure to watch the video for more examples and tips.
These date/time adjustments are sure to come in handy!
🎦📚😃 Get more training from Quick Base Junkie https://quickbasejunkie.com/training
RESOURCES:
Get the Intro to Jinja for Pipelines course: https://www.quickbasejunkie.com/intro-to-jinja
Learn More About Jinja: https://www.quickbasejunkie.com/blog/what-is-jinja
Set the time zone, using Jinja: https://www.quickbasejunkie.com/blog/how-to-jinja-time-zone
Feeling like a Junkie? Subscribe Now!
https://www.quickbasejunkie.com/sign-up
LET'S CONNECT!
LinkedIn ➤ https://linkedin.com/company/quickbasejunkie/
Instagram ➤ https://instagram.com/quickbasejunkie/
Facebook ➤ https://fb.me/quickbasejunkie
Quick Base Junkie ➤ https://quickbasejunkie.com
Learn More About Quickbase @ https://quickbase.com
© Quick Base Junkie
COPYRIGHT NOTICE: The content, title, description, and specific ways in which the information in this video is organized, documented, and presented are the creative property of Quick Base Junkie. For use in any medium attribution is required, for questions or use permission, contact me @ https://quickbasejunkie.com/contact.
Quick Base Junkie is unofficial and not affiliated with Quickbase Inc.
Видео Adjust dates in Quickbase Pipelines using Jinja канала Quick Base Junkie
Комментарии отсутствуют
Информация о видео
10 июня 2021 г. 7:15:09
00:07:30
Другие видео канала




















