ZBrain Documentation
  • ZBrain Documentation
    • Components of ZBrain
    • Getting started with ZBrain
    • 📚Knowledge base
      • How to create a knowledge base?
      • Knowledge source
      • Information schema
      • File summary
      • Automated reasoning
      • Retrieval testing
      • Knowledge base settings
    • 📱APP
      • How to create a new app?
      • How to set up and customize your app?
      • How to access the app reporting dashboard?
    • 🤖ZBrain AI agents
      • Get started with agents on ZBrain
      • Deploying pre-built agents
      • Creating custom AI agents
        • Agent setup
        • Define input sources
        • Define Flow
          • Key elements of a Flow
          • Flow Components
            • Activepieces Platform
            • AITable
            • Airtable
            • Amazon S3
            • Amazon SNS
            • Amazon SQS
            • Amazon Textract
            • Apify
            • Apollo
            • Approval
            • Asana
            • Azure Communication Services
            • Azure Cosmos DB
            • Azure Document Intelligence
            • Azure OpenAI
            • Azure Translation
            • Bannerbear
            • Baserow
            • Beamer
            • Bedrock Claude
            • Bettermode
            • Binance
            • Bing Search
            • Blackbaud
            • Bonjoro
            • Box
            • Brevo
            • Brilliant Directories
            • Bubble
            • CSV
            • Calendly
            • Certopus
            • Clearout
            • Clockodo
            • Code
            • Confluence
            • Connections
            • Constant Contact
            • Contiguity
            • Contentful
            • Customer.io
            • Crypto
            • Databricks
            • Data Mapper
            • Date Helper
            • DeepL
            • Delay
            • Discord
            • Discourse
            • Drip
            • Dropbox
            • Dust
            • Facebook Pages
            • Figma
            • Files Helper
            • Flowise
            • Flowlu
            • Formbricks
            • Frame
            • Freshdesk
            • Freshsales
            • GCloud Pub/Sub
            • GenerateBanners
            • GhostCMS
            • GitHub
            • GitLab
            • Gmail
            • Google Calendar
            • Google Contacts
            • Google Docs
            • Google Drive
            • Google Forms
            • Google Gemini
            • Google My Business
            • Google Search
            • Google Search Console
            • Google Sheets
            • Google Tasks
            • Groq
            • Hacker News
            • Heartbeat
            • HubSpot
            • HTTP
            • Image Helper
            • Inputs
            • Instagram for Business
            • Intercom
            • Invoice Ninja
            • Jira Cloud
            • Jotform
            • Kimai
            • Kizeo Forms
            • LeadConnector
            • Line Bot
            • Linear
            • LinkedIn
            • LinkedIn Actions
            • LLMRails
            • Lusha
            • MailerLite
            • Mailchimp
            • Mautic
            • Microsoft Dynamics 365 Business Central
            • Microsoft Dynamics CRM
            • Microsoft Excel 365
            • Microsoft OneDrive
            • Microsoft Outlook Calendar
            • Microsoft Teams
            • Mixpanel
            • MongoDB
            • Notion
            • Odoo
            • OpenAI
            • OpenRouter
            • Pastebin
            • PDF
            • Postgres
            • PostHog
            • Pushover
            • Qdrant
            • Queue
            • Razorpay
            • Router
            • Salesforce
            • SendGrid
            • ServiceNow
            • SFTP
            • SharePoint
            • Slack
            • SMTP
            • Snowflake
            • SOAP
            • Spotify
            • Stability AI
            • Stable Diffusion Web UI
            • Storage
            • Stripe
            • SurrealDB
            • SurveyMonkey
            • Taskade
            • Telegram Bot
            • Text Helper
            • Trello
            • Twilio
            • Twitter
            • Utilities
            • WhatsApp Business
            • WordPress
            • XML
            • YouTube
            • ZBrain
            • Zendesk
            • ZeroBounce
            • Zoho Books
            • Zoho CRM
            • Zoho Invoice
            • Zoom
          • How to Define a Flow?
          • How to Test Each Step in the Flow?
        • Configure Additional Settings
        • Test and Deploy Agents
        • How to access, monitor, and manage agent performance and tasks?
    • Settings
    • 📖API Tutorials
      • 📚Knowledge base
        • Automated Reasoning
      • 📱APP
      • 🤖Agents
Powered by GitBook
On this page
  • How to Use Date Helper in ZBrain Flow?
  • How to Get Current Date?
  • How to Format Date?
  • How to Extract Date Units?
  • How to Calculate Date Differences?
  • How to Add/Substract Time?
  • How to Find the Next Day of Week?
  • How to Find the Next Day of Year?
  1. ZBrain Documentation
  2. ZBrain AI agents
  3. Creating custom AI agents
  4. Define Flow
  5. Flow Components

Date Helper

The Date Helper piece in ZBrain Flow provides comprehensive date and time manipulation capabilities for your workflows. This versatile tool allows you to work with dates in various formats, calculate time differences, extract specific components of dates, and perform date arithmetic operations. Whether you need to schedule events, calculate durations, format timestamps, or determine specific days, the Date Helper offers a complete set of time-related functions without requiring custom code.

How to Use Date Helper in ZBrain Flow?

Step 1: Select Date Helper as Your Connection

  • Click on the '+' button in the Flow and search for Date Helper.

  • Select Date Helper.

  • Decide on the action you need. ZBrain Flow provides several options:

    • Get Current Date – Retrieves the current date and time.

    • Format Date – Converts a date from one format to another.

    • Extract Date Units – Extracts components like year, month, day from a date.

    • Date Difference – Calculates the time between two dates.

    • Add/Subtract Time – Performs date arithmetic operations.

    • Next Day of Week – Finds the next occurrence of a specific weekday.

    • Next Day of Year – Finds the next occurrence of a specific calendar day.

How to Get Current Date?

Step 1: Add Get Current Date Action

  • Choose the ‘Get Current Date’ action from the list of options available.

Step 2: Configure Output Format

  • In the ‘To Time Format’ field, select how you want the date and time to be formatted (e.g., DDD MMM DD YYYY HH:mm:ss → Sun Sep 17 2023 11:23:58).

Step 3: Select Time Zone

  • Choose your desired time zone from the ‘Time Zone’ dropdown.

How to Format Date?

Step 1: Add Format Date Action

  • Choose the ‘Format Date’ action from the options available. This action allows you to convert dates from one format to another and switch between time zones.

Step 2: Configure Input Date

  • In the ‘Input Date’ field, enter the date you want to format.

  • Select the ‘From Time Format’ to match your input date's current format (e.g., DDD MMM DD YYYY HH:mm:ss → Sun Sep 17 2023 11:23:58).

Step 3: Select Input Time Zone

  • Choose the ‘From Time Zone’ that your input date is currently in.

Step 4: Set Output Time Format and Zone

  • Choose your desired ‘To Time Format’ for how you want the date to appear after conversion. You can select from preset formats.

  • Choose the ‘To Time Zone’ for the destination time zone. This allows you to convert the date across different time zones as needed.

How to Extract Date Units?

Step 1: Add Extract Date Units Action

  • Choose the ‘Extract Date Units’ action from the Date Helper.

Step 2: Configure Input Date and Format

  • In the ‘Input Date’ field, enter the date you want to extract information from.

  • Set the ‘From Time Format’ to match your input date's format (e.g., DDD MMM DD YYYY HH:mm:ss → Sun Sep 17 2023 11:23:58).

Step 3: Select Unit to Extract

  • From the ‘Unit to Extract’ dropdown, choose the component you want to extract (e.g., year, month, day, minute, hour).

How to Calculate Date Differences?

Step 1: Add Date Difference Action

  • Choose the ‘Date Difference’ action from Date Helper.

Step 2: Configure Starting Date and Format

  • In the ‘Starting Date’ field, enter the earlier date.

  • Set the ‘Starting date format’ to match your input date's format (e.g., DDD MMM DD YYYY HH:mm:ss → Sun Sep 17 2023 11:23:58).

Step 3: Configure Ending Date and Format

  • In the ‘Ending Date’ field, enter the later date to compare against.

  • Set the ‘Ending date’ format to match your second date's format.

Step 4: Select Measurement Unit

  • From the ‘Unit’ dropdown, choose how you want to measure the difference (e.g., year, month, day, minute, hour).

How to Add/Substract Time?

Step 1: Add the Add/Subtract Time Action

  • Choose the ‘Add/Subtract Time’ action from the available ‘Date Helper’ options.

Step 2: Configure and Specify Input Date and Format

  • In the ‘Input Date’ field, enter the base date you want to modify.

  • Choose from the dropdown options available in the ‘From Time Format’ that best represents your input date's format.

Step 3: Set Output Format

  • Select from various format options available in the ‘To Time Format’ for how you want the resulting date to appear.

Step 4: Enter Time Expression

  • In the ‘Expression’ field, specify how much time to add or subtract

Use the following syntax:

  • To add time: + [number] [unit] (e.g., + 2 hour)

  • To subtract time: - [number] [unit] (e.g., - 3 day)

  • Valid units: year, month, day, hour, minute, second

How to Find the Next Day of Week?

Step 1: Add Next Day of Week Action

  • Choose the ‘Next Day of Week’ action from the available options in ‘Date Helper’.

Step 2: Select Target Weekday

  • From the ‘Weekday’ dropdown, choose which day of the week you want to get the date and time of (Monday, Tuesday, etc.).

Step 3: Specify Time

  • Enter the desired time in the ‘24h Time’ field using 24-hour format (e.g., 14:30 for 2:30 PM).

  • Alternatively, enable ‘Use Current Time’ to automatically use the current time instead.

Step 4: Configure Output Format

  • Set the ‘To Time Format’ for how you want the resulting date and time to appear.

Step 5: Select Time Zone

  • Choose the ‘Time Zone’ for the result from the dropdown.

How to Find the Next Day of Year?

Step 1: Add Next Day of Year Action

  • Choose the ‘Next Day of Year’ action from the available options in Date Helper.

Step 2: Select Month

  • From the ‘Month’ dropdown, choose which month you want to target (January, February, etc.).

Step 3: Specify Day of Month

  • Enter the desired ‘Day of Month’ (1-31, depending on the month).

Step 4: Set Time

  • Enter the desired time in the ‘24h Time’ field (e.g., 14:30 for 2:30 PM).

  • Or enable ‘Use Current Time’ to automatically use the current time instead.

Step 5: Configure Output Format

  • Set the ‘To Time Format’ for how you want the resulting date and time to appear.

Step 6: Select Time Zone

  • Choose the ‘Time Zone’ for the result from the dropdown.

PreviousData MapperNextDeepL

Last updated 1 month ago

🤖