Skip to content

Extract Part Of A Date

Before using this node, ensure you have:

  • Basic understanding of workflow creation in Agentic WorkFlow
  • Appropriate browser permissions configured (if applicable)
  • Required dependencies installed and configured

The Extract Part Of A Date node provides comprehensive date parsing and component extraction capabilities for breaking down dates into their constituent parts. This node handles multiple date formats including ISO 8601, locale-specific, and custom formats, timezone conversions, and specialized date components, making it essential for date analysis, filtering, and conditional workflow logic based on temporal data.

Extract Part Of A Date serves as a powerful date parsing tool that allows you to:

  • Extract individual components like year, month, day, hour, minute, second
  • Parse dates from multiple input formats and string representations
  • Handle timezone information and convert between timezones
  • Calculate derived values like day of week, quarter, week number
  • Support batch extraction from multiple dates simultaneously
  • Comprehensive Component Extraction: Extract any date/time component including derived values
  • Multi-Format Parsing: Handle multiple date string formats and automatic format detection
  • Timezone Processing: Extract and convert timezone information
  • Derived Calculations: Calculate day of week, quarter, week of year, and more
  • Batch Processing: Extract components from multiple dates in one operation
  • Date Filtering: Extract components for conditional workflow logic
  • Analytics and Reporting: Break down dates for time-based analysis
  • Data Validation: Verify date components meet specific criteria
  • Scheduling Logic: Extract time components for scheduling decisions
ParameterTypeDescriptionExample
input_datestring/dateDate to extract components from"2024-01-15T14:30:45Z"
componentsarrayList of components to extract["year", "month", "day", "hour"]
ParameterTypeDefaultDescriptionExample
input_formatstring"auto"Expected input format or “auto” for detection"YYYY-MM-DD HH:mm:ss"
timezonestring"UTC"Timezone for extraction"America/New_York"
localestring"en-US"Locale for text-based components"fr-FR"
output_formatstring"object"Output format: “object”, “array”, or “flat”"flat"
ComponentDescriptionExample Output
yearFour-digit year2024
monthMonth number (1-12)1
month_nameFull month name"January"
month_shortAbbreviated month name"Jan"
dayDay of month (1-31)15
day_of_weekDay of week (0=Sunday, 6=Saturday)1
day_nameFull day name"Monday"
day_shortAbbreviated day name"Mon"
hourHour (0-23)14
minuteMinute (0-59)30
secondSecond (0-59)45
millisecondMillisecond (0-999)123
quarterQuarter of year (1-4)1
week_of_yearWeek number in year3
day_of_yearDay number in year (1-366)15
timezone_offsetTimezone offset in minutes-300
timezone_nameTimezone abbreviation"EST"
is_weekendBoolean indicating weekendfalse
is_leap_yearBoolean indicating leap yeartrue
{
"input_date": "2024-01-15T14:30:45.123Z",
"components": [
"year", "month", "day", "hour", "minute",
"day_name", "quarter", "week_of_year", "is_weekend"
],
"timezone": "America/New_York",
"locale": "en-US",
"output_format": "object",
"custom_components": {
"fiscal_year": {
"start_month": 4,
"calculation": "year + (month >= 4 ? 0 : -1)"
},
"business_quarter": {
"q1_start": 4,
"calculation": "custom"
}
}
}
{
"date": "2024-01-15T14:30:45.123Z",
"extraction_config": {
"components": ["year", "month", "day", "day_name", "quarter"],
"timezone": "America/New_York",
"locale": "en-US"
}
}
{
"original_date": "2024-01-15T14:30:45.123Z",
"extracted_components": {
"year": 2024,
"month": 1,
"day": 15,
"hour": 9,
"minute": 30,
"day_name": "Monday",
"quarter": 1,
"week_of_year": 3,
"is_weekend": false,
"timezone_name": "EST",
"timezone_offset": -300
},
"metadata": {
"input_timezone": "UTC",
"output_timezone": "America/New_York",
"locale_used": "en-US",
"parsing_time": 8,
"components_extracted": 10
}
}

Scenario: Extract year, month, and day from a timestamp for date-based filtering

Configuration:

{
"input_date": "2024-01-15T14:30:45Z",
"components": ["year", "month", "day"],
"output_format": "flat"
}

Input Data:

{
"event_timestamp": "2024-01-15T14:30:45Z"
}

Expected Output:

{
"year": 2024,
"month": 1,
"day": 15,
"metadata": {
"components_extracted": 3,
"parsing_time": 5
}
}

Scenario: Extract multiple components for analytics dashboard

Configuration:

{
"input_date": "2024-01-15T14:30:45Z",
"components": [
"year", "month", "month_name", "day", "day_name",
"quarter", "week_of_year", "is_weekend", "hour"
],
"timezone": "America/New_York",
"locale": "en-US"
}

Workflow Integration:

Data Source → Extract Part Of A Date → Analytics Filter
↓ ↓ ↓
timestamps date_components filtered_data

Complete Example:

{
"input": {
"user_activity": [
{"timestamp": "2024-01-15T14:30:45Z", "action": "login"},
{"timestamp": "2024-01-15T16:45:30Z", "action": "purchase"}
]
},
"processing": {
"extract_from_each": "timestamp",
"components": ["hour", "day_name", "is_weekend"]
},
"output": {
"enriched_activity": [
{
"timestamp": "2024-01-15T14:30:45Z",
"action": "login",
"hour": 9,
"day_name": "Monday",
"is_weekend": false
},
{
"timestamp": "2024-01-15T16:45:30Z",
"action": "purchase",
"hour": 11,
"day_name": "Monday",
"is_weekend": false
}
]
}
}

This example demonstrates the fundamental usage of the ExtractPartOfADate node in a typical workflow scenario.

Configuration:

{
"date": "example_value",
"format": true
}

Input Data:

{
"data": "sample input data"
}

Expected Output:

{
"result": "processed output data"
}

This example shows more complex configuration options and integration patterns.

Configuration:

{
"parameter1": "advanced_value",
"parameter2": false,
"advancedOptions": {
"option1": "value1",
"option2": 100
}
}

Example showing how this node integrates with other workflow nodes:

  1. Previous NodeExtractPartOfADateNext Node
  2. Data flows through the workflow with appropriate transformations
  3. Error handling and validation at each step
  • Nodes: Data Source → Extract Part Of A Date → Filter → Processing
  • Use Case: Filter data based on specific date components
  • Configuration Tips: Extract only the components needed for filtering to optimize performance
  • Nodes: Raw Data → Extract Part Of A Date → Edit Fields → Analytics Dashboard
  • Use Case: Enrich data with temporal components for analysis
  • Data Flow: Raw timestamps → date components → structured data → visualizations
  • Performance: Extract only the components you need to minimize processing time
  • Error Handling: Validate date formats before extraction to prevent parsing errors
  • Data Validation: Check for null or invalid dates in input data
  • Resource Management: Use batch processing for large datasets
  • Symptoms: Node fails to parse input dates or returns null values
  • Causes: Unsupported date format or invalid date strings
  • Solutions:
    1. Specify input_format explicitly instead of using “auto”
    2. Validate date strings before extraction
    3. Use standard ISO date formats when possible
  • Prevention: Standardize date formats in your data pipeline
  • Symptoms: Incorrect time components or unexpected timezone results
  • Causes: Invalid timezone identifiers or daylight saving time issues
  • Solutions:
    1. Use valid IANA timezone identifiers
    2. Check timezone_offset in output for verification
    3. Test around DST transition dates
  • Prevention: Validate timezone strings and handle DST transitions
  • Slow Extraction: Reduce the number of components or use batch processing
  • Memory Usage: Process large date arrays in chunks
  • Locale Loading: Cache locale data for frequently used locales
  • Date Range: Supports dates from 1900-01-01 to 2100-12-31
  • Component Limit: Maximum 20 components per extraction operation
  • Auto-Detection: May not correctly identify all custom date formats
  • Ambiguous Dates: MM/DD/YYYY vs DD/MM/YYYY requires explicit format specification
  • Locale Support: Some locales may have limited component name translations
  • Input Size: Maximum 1000 dates per batch operation
  • Processing Time: Complex extractions timeout after 30 seconds
  • Memory Usage: Large component extractions may require chunking

Field Transformation: Process of modifying data field names, types, or values

Type Conversion: Converting data from one type to another (string, number, boolean, etc.)

Data Validation: Process of ensuring data meets specified criteria and constraints

Schema: Structure definition that describes the format and constraints of data

Serialization: Process of converting data structures into a format for storage or transmission

  • data processing
  • field manipulation
  • type conversion
  • data validation
  • formatting
  • transformation
  • “transform”
  • “convert”
  • “format”
  • “edit”
  • “modify”
  • “process”
  • “validate”
  • “clean”
  • “restructure”
  • data cleaning
  • format conversion
  • field manipulation
  • data validation
  • report generation
  • data processing
  • AddToADate: Use when you need different approach to similar functionality
  • SubstractFromDate: Use when you need different approach to similar functionality
  • FormatDate: Works well together in workflows
  • GetCurrentDate: Works well together in workflows
  • EditFields: Works well together in workflows
  • GetCurrentDate → ExtractPartOfADate → EditFields: Common integration pattern
  • Http-Request → ExtractPartOfADate → Filter: Common integration pattern

Decision Guides:

General Resources: