Skip to main content

Guide to Date/Time Formatter Workflow Action in Stack

The Date/Time Formatter action in Stack is a powerful tool for managing and manipulating date and time data within your workflows. Whether you're reformatting dates for compatibility or comparing them to calculate differences, this feature simplifies date-related tasks across various applications, databases, and communication channels like email, SMS, or Slack.

Table of Contents

What is the Date/Time Formatter Workflow Action?

The Date/Time Formatter action is designed to help you handle dates and times efficiently in your automated workflows. Here are the primary capabilities:

  • Format Dates: Change the appearance of dates (e.g., 2024-12-09).
  • Format Date-Times: Alter both date and time formats (e.g., 2024-12-09 15:48).
  • Compare Dates: Determine the difference between two dates (e.g., 2024-12-09 vs. 2024-12-08).

These features allow you to tailor date and time formats to meet your needs, ensuring information is correctly shared or stored.

Key Benefits of Date/Time Formatter Action

  • Consistency: Maintain uniform date and time formats across platforms, enhancing readability and reducing confusion.
  • Compatibility: Ensure seamless data exchange between different tools by converting date and time formats as needed.
  • Decision-making: Simplify date comparisons and calculations, aiding informed decisions in time-sensitive situations.
  • Flexibility: Choose from a variety of format options to suit specific needs or preferences.

How to Set Up Date/Time Formatter Action

  1. Access Workflow Builder
    Navigate to Automation > Create Workflow > + Start from Scratch. Alternatively, select an existing workflow to incorporate the Date/Time Formatter action.

  2. Select Date/Time Formatter Action
    Click the "+" icon to access the list of workflow actions and choose "Date/Time Formatter".

Understanding Different Action Types

The Date/Time Formatter action lets you format, store, and compare date values within your workflows. Once configured, it stores the reformatted or calculated values as dynamic variables for use in subsequent actions like sending emails or updating CRM fields.

Format Date

  • Field Selection: Choose the date field to reformat, such as a Specific Date, Current Date, or Appointment dates.
  • From Format: The tool auto-detects the format for system fields. For Custom Values or Webhook Triggers, manually select the format.
  • To Format: Select the desired output format for the date.

Format Date-Time

  • Field Selection: Choose the date and time field to reformat from sources like Specific Date and Time or Appointment dates.
  • From Format: Auto-detection is available for system fields; manual selection is required for Custom Values or Webhook Triggers.
  • To Format: Choose the desired output format for the date and time.

Compare Dates

  • Start Date Selection: Pick the start date from various sources, including Specific Date or Current Date.
  • Start Date Format: Auto-detection is available for system fields; manual selection is needed for Custom Values or Webhook Triggers.
  • End Date Selection: Choose the end date from the same sources as the start date.
  • End Date Format: Similar to the start date format, with auto-detection for system fields.

The difference is calculated as End Date - Start Date, yielding a negative value if the Start Date exceeds the End Date.

Use Cases

  • Event Organizers: Standardize event dates and times for clarity.
  • Marketing Teams: Use formatted dates in campaigns for personalized communication.
  • Sales Teams: Send reminders based on invoice due dates.
  • Customer Support: Reformat date data for support tickets or CRM updates.
  • Project Managers: Calculate time remaining for projects and notify team members.
  • Data Analysts: Store consistently formatted data for easier analysis.
  • Software Developers: Integrate formatted data for compatibility in applications.
  • E-commerce Businesses: Reformat order dates for improved tracking and communication.

Frequently Asked Questions

Q: How do I use the formatted date or time in other workflow actions?
Once processed, the reformatted date or time is stored in a dynamic variable (e.g., {{datetime_formatter.1.date}}, {{datetime_formatter.1.datetime}}). You can reference this variable in subsequent workflow actions such as sending emails or updating CRM fields.

Q: What happens if I select the wrong format in the “From Format” field?
If the selected From Format doesn't match the input date's actual format, the workflow might fail to process the date correctly, resulting in missing or incorrect values. Always ensure the From Format matches the original date structure.

Q: Can I compare a date field from a contact’s record with the current date?
Yes, you can compare a stored contact date (e.g., "Signup Date") with the Current Date using the Compare Dates function. This is useful for triggering reminders or automated actions based on elapsed time.

Q: Can the Date/Time Formatter action handle time zone differences?
The action processes dates and times based on the system's default time zone settings. For workflows involving multiple time zones, ensure all date/time values are standardized or converted accordingly before formatting.