Skip to main content

Date

The Date node provides comprehensive date and time operations for workflows, enabling precise handling of timestamps, timezone conversions, and date calculations. This is essential for logistics operations that require accurate time tracking across different regions and systems.

Overview

The Date node is essential when you need to:

  • Timestamp management - Generate current timestamps for logging and tracking
  • Timezone conversion - Convert times between different geographic regions
  • Date formatting - Transform dates into various display and storage formats
  • Schedule calculations - Calculate delivery dates, cutoff times, and schedules
  • Time-based logic - Make decisions based on time comparisons and calculations
  • Audit trails - Add precise timestamps to workflow data

Operations

Convert Operation

Transform existing date/time values to new formats or timezones:

  • Format conversion - Change date display format (ISO, US, European, custom)
  • Timezone conversion - Convert between different timezones
  • Precision adjustment - Add or remove time precision (seconds, milliseconds)
  • Locale formatting - Format dates according to regional preferences

Current Operation

Get the current timestamp with optional formatting and timezone:

  • Current timestamp - Generate current date and time
  • Timezone specification - Get current time in specific timezone
  • Format selection - Return timestamp in desired format
  • Precision control - Specify timestamp precision level

Manipulate Operation

Perform date arithmetic to add or subtract time periods:

  • Add time - Add days, hours, minutes, seconds to a date
  • Subtract time - Remove time periods from a date

Configuration

Input Settings

  • Source date - Input date/time value from workflow data
  • Input format - Specify format of input date (if not standard)
  • Input timezone - Timezone of input date (if not specified in data)

Output Settings

  • Output format - Desired format for result (ISO 8601, custom format, etc.)
  • Output timezone - Target timezone for result
  • Locale - Regional formatting preferences

Operation-Specific Settings

Convert Settings

  • Source timezone - Original timezone of input date
  • Target timezone - Desired timezone for output
  • Format mapping - Input and output format specifications

Current Settings

  • Timezone - Timezone for current timestamp (default: UTC)
  • Format - Output format for current time
  • Offset handling - How to handle daylight saving time

Manipulate Settings

  • Operation type - Add or subtract time
  • Time units - Days, hours, minutes, seconds, months, years
  • Amount - Quantity to add or subtract
  • Business days only - Exclude weekends and holidays

Example Usage & Common Use Cases

Current Timestamp Generation

Workflow Logging:
Process shipment → Add timestamp → Log to database

Configuration:
Operation: Current
Timezone: UTC
Format: ISO 8601

Output: "2024-01-15T14:30:45Z"

Timezone Conversion

Global Operations:
Receive local delivery time → Convert to UTC → Store in system

Configuration:
Operation: Convert
Input: "2024-01-15 09:30:00"
Source Timezone: America/New_York
Target Timezone: UTC
Format: ISO 8601

Input: "2024-01-15 09:30:00" (EST)
Output: "2024-01-15T14:30:00Z" (UTC)

Delivery Date Calculation

Shipping Schedule:
Order placed → Add transit time → Calculate delivery date

Configuration:
Operation: Manipulate
Input: {{orderDate}}
Operation Type: Add
Amount: 3
Unit: Days
Business Days Only: true

Input: "2024-01-15" (Monday)
Output: "2024-01-18" (Thursday, skipping weekend)

Cutoff Time Validation

Order Processing:
Check order time → Compare to cutoff → Determine processing date

Configuration:
Operation: Convert
Input: {{orderTimestamp}}
Target Timezone: America/Chicago
Format: HH:mm

Processing Logic:
If time < 15:00 → Same day processing
If time >= 15:00 → Next business day processing

SLA Monitoring

Performance Tracking:
Shipment created → Add SLA period → Set expected delivery

Configuration:
Operation: Manipulate
Input: {{shipmentCreated}}
Operation Type: Add
Amount: 72
Unit: Hours
Timezone: Customer timezone

Output: Expected delivery timestamp for SLA tracking

Multi-Timezone Reporting

Global Dashboard:
Collect events → Convert all to UTC → Generate unified report

Loop Configuration:
For each event:
Operation: Convert
Input: {{event.timestamp}}
Source Timezone: {{event.timezone}}
Target Timezone: UTC
Format: ISO 8601

Output: Standardized timestamps for global reporting

Schedule Coordination

Appointment Scheduling:
Available slot → Convert to customer timezone → Confirm appointment

Configuration:
Operation: Convert
Input: {{availableSlot}}
Source Timezone: Facility timezone
Target Timezone: {{customer.timezone}}
Format: "MMM dd, yyyy h:mm a"

Output: "Jan 15, 2024 2:30 PM" (customer local time)

Aging Analysis

Inventory Management:
Item received date → Calculate age → Determine priority

Configuration:
Operation: Manipulate
Input: {{receivedDate}}
Operation Type: Subtract from current
Unit: Days

Processing:
Current date - received date = age in days
Use age for priority classification

Advanced Features

Format Specifications

  • ISO 8601 - International standard format (2024-01-15T14:30:45Z)
  • RFC 2822 - Email/HTTP standard format
  • Unix timestamp - Seconds since epoch
  • Custom formats - User-defined format strings (yyyy-MM-dd HH:mm:ss)
  • Locale-specific - Regional date formats (US: MM/dd/yyyy, EU: dd/MM/yyyy)

Timezone Handling

  • IANA timezone database - Standard timezone identifiers (America/New_York)
  • UTC offsets - Fixed offset specifications (+05:00, -08:00)
  • Daylight saving time - Automatic DST adjustments
  • Historical accuracy - Handle timezone rule changes over time

Precision Control

  • Millisecond precision - High-precision timestamps
  • Second precision - Standard timestamp accuracy
  • Minute precision - Rounded to nearest minute
  • Day precision - Date only, no time component

Best Practices

Timezone Management

  • Always specify timezones - Avoid ambiguous local times
  • Use UTC for storage - Store all timestamps in UTC
  • Convert for display - Show times in user's local timezone
  • Handle DST transitions - Account for daylight saving changes

Format Consistency

  • Standardize formats - Use consistent date formats across workflows
  • ISO 8601 preference - Use international standard when possible
  • Document formats - Clearly specify expected input/output formats
  • Validate inputs - Check date format before processing

Performance Optimization

  • Minimize conversions - Avoid unnecessary format changes
  • Use appropriate precision - Don't use higher precision than needed

Integration Patterns

With Conditional Logic

Date Node (current) → If Node (time check) → Different processing paths

With Loops

Event List → Loop → Date Node (convert each) → Collect Results

With External APIs

Date Node (format for API) → HTTP Request → External System

With Database Operations

Date Node (current timestamp) → Set Node (add to data) → Database Insert

Troubleshooting

Common Issues

  • Timezone errors - Verify timezone identifiers are correct
  • Format mismatches - Ensure input format matches configuration
  • Invalid dates - Check for impossible dates (Feb 30, etc.)
  • DST complications - Handle daylight saving time transitions

Debugging Tips

  • Test with known dates - Use specific test dates to verify behavior
  • Check timezone databases - Ensure timezone data is current
  • Validate input formats - Confirm input dates match expected format
  • Monitor precision - Verify output precision meets requirements

Performance Issues

  • Large date ranges - Optimize calculations for large time periods
  • Frequent conversions - Cache conversion results when possible
  • Complex calculations - Break down complex date math into steps
  • Timezone lookups - Minimize timezone database queries

The Date node provides essential time management capabilities for logistics workflows, enabling precise timestamp handling, timezone conversions, and date calculations across global operations.