Extract Part Of A Date
Extract Part Of A Date
Section titled “Extract Part Of A Date”Prerequisites
Section titled “Prerequisites”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
Overview
Section titled “Overview”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.
Purpose and Functionality
Section titled “Purpose and Functionality”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
Key Features
Section titled “Key Features”- 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
Primary Use Cases
Section titled “Primary Use Cases”- 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
Parameters & Configuration
Section titled “Parameters & Configuration”Required Parameters
Section titled “Required Parameters”| Parameter | Type | Description | Example |
|---|---|---|---|
input_date | string/date | Date to extract components from | "2024-01-15T14:30:45Z" |
components | array | List of components to extract | ["year", "month", "day", "hour"] |
Optional Parameters
Section titled “Optional Parameters”| Parameter | Type | Default | Description | Example |
|---|---|---|---|---|
input_format | string | "auto" | Expected input format or “auto” for detection | "YYYY-MM-DD HH:mm:ss" |
timezone | string | "UTC" | Timezone for extraction | "America/New_York" |
locale | string | "en-US" | Locale for text-based components | "fr-FR" |
output_format | string | "object" | Output format: “object”, “array”, or “flat” | "flat" |
Available Components
Section titled “Available Components”| Component | Description | Example Output |
|---|---|---|
year | Four-digit year | 2024 |
month | Month number (1-12) | 1 |
month_name | Full month name | "January" |
month_short | Abbreviated month name | "Jan" |
day | Day of month (1-31) | 15 |
day_of_week | Day of week (0=Sunday, 6=Saturday) | 1 |
day_name | Full day name | "Monday" |
day_short | Abbreviated day name | "Mon" |
hour | Hour (0-23) | 14 |
minute | Minute (0-59) | 30 |
second | Second (0-59) | 45 |
millisecond | Millisecond (0-999) | 123 |
quarter | Quarter of year (1-4) | 1 |
week_of_year | Week number in year | 3 |
day_of_year | Day number in year (1-366) | 15 |
timezone_offset | Timezone offset in minutes | -300 |
timezone_name | Timezone abbreviation | "EST" |
is_weekend | Boolean indicating weekend | false |
is_leap_year | Boolean indicating leap year | true |
Advanced Configuration
Section titled “Advanced Configuration”{ "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" } }}Input/Output Specifications
Section titled “Input/Output Specifications”Input Data Structure
Section titled “Input Data Structure”{ "date": "2024-01-15T14:30:45.123Z", "extraction_config": { "components": ["year", "month", "day", "day_name", "quarter"], "timezone": "America/New_York", "locale": "en-US" }}Output Data Structure
Section titled “Output Data Structure”{ "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 }}Practical Examples
Section titled “Practical Examples”Example 1: Basic Component Extraction
Section titled “Example 1: Basic Component Extraction”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 }}Example 2: Comprehensive Date Analysis
Section titled “Example 2: Comprehensive Date Analysis”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_dataComplete 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 } ] }}Examples
Section titled “Examples”Basic Usage
Section titled “Basic Usage”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"}Advanced Usage
Section titled “Advanced Usage”This example shows more complex configuration options and integration patterns.
Configuration:
{ "parameter1": "advanced_value", "parameter2": false, "advancedOptions": { "option1": "value1", "option2": 100 }}Integration Example
Section titled “Integration Example”Example showing how this node integrates with other workflow nodes:
- Previous Node → ExtractPartOfADate → Next Node
- Data flows through the workflow with appropriate transformations
- Error handling and validation at each step
Integration Patterns
Section titled “Integration Patterns”Common Node Combinations
Section titled “Common Node Combinations”Pattern 1: Date-Based Filtering
Section titled “Pattern 1: Date-Based Filtering”- 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
Pattern 2: Analytics Enrichment
Section titled “Pattern 2: Analytics Enrichment”- 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
Best Practices
Section titled “Best Practices”- 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
Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”Issue: Date Parsing Failures
Section titled “Issue: Date Parsing Failures”- Symptoms: Node fails to parse input dates or returns null values
- Causes: Unsupported date format or invalid date strings
- Solutions:
- Specify input_format explicitly instead of using “auto”
- Validate date strings before extraction
- Use standard ISO date formats when possible
- Prevention: Standardize date formats in your data pipeline
Issue: Timezone Conversion Problems
Section titled “Issue: Timezone Conversion Problems”- Symptoms: Incorrect time components or unexpected timezone results
- Causes: Invalid timezone identifiers or daylight saving time issues
- Solutions:
- Use valid IANA timezone identifiers
- Check timezone_offset in output for verification
- Test around DST transition dates
- Prevention: Validate timezone strings and handle DST transitions
Performance Issues
Section titled “Performance Issues”- 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
Limitations & Constraints
Section titled “Limitations & Constraints”Technical Limitations
Section titled “Technical Limitations”- Date Range: Supports dates from 1900-01-01 to 2100-12-31
- Component Limit: Maximum 20 components per extraction operation
Format Limitations
Section titled “Format Limitations”- 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
Data Limitations
Section titled “Data Limitations”- Input Size: Maximum 1000 dates per batch operation
- Processing Time: Complex extractions timeout after 30 seconds
- Memory Usage: Large component extractions may require chunking
Key Terminology
Section titled “Key Terminology”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
Search & Discovery
Section titled “Search & Discovery”Keywords
Section titled “Keywords”- data processing
- field manipulation
- type conversion
- data validation
- formatting
- transformation
Common Search Terms
Section titled “Common Search Terms”- “transform”
- “convert”
- “format”
- “edit”
- “modify”
- “process”
- “validate”
- “clean”
- “restructure”
Primary Use Cases
Section titled “Primary Use Cases”- data cleaning
- format conversion
- field manipulation
- data validation
- report generation
- data processing
Learning Path
Section titled “Learning Path”Skill Level: Beginner
Section titled “Skill Level: Beginner”Enhanced Cross-References
Section titled “Enhanced Cross-References”Workflow Patterns
Section titled “Workflow Patterns”Related Tutorials
Section titled “Related Tutorials”Practical Examples
Section titled “Practical Examples”Related Nodes
Section titled “Related Nodes”Similar Functionality
Section titled “Similar Functionality”- AddToADate: Use when you need different approach to similar functionality
- SubstractFromDate: Use when you need different approach to similar functionality
Complementary Nodes
Section titled “Complementary Nodes”- FormatDate: Works well together in workflows
- GetCurrentDate: Works well together in workflows
- EditFields: Works well together in workflows
Common Workflow Patterns
Section titled “Common Workflow Patterns”- GetCurrentDate → ExtractPartOfADate → EditFields: Common integration pattern
- Http-Request → ExtractPartOfADate → Filter: Common integration pattern
See Also
Section titled “See Also”- Data Processing Patterns
- Data Transformation Guide
- Data Mapping Expressions
- Field Validation Examples
Decision Guides:
General Resources: