DurationSinceUnixEpoch / Temporal Layer
Calculate duration between datetime values and Unix epoch (1970-01-01 00:00:00 UTC) in specified precision. Similar to Python's datetime.timestamp() but with flexible precision options.
Example durations:
DateTime (UTC) | Unit | Duration | Note |
---|---|---|---|
1970-01-01 00:00:00 | ms | 0 | Epoch start |
1970-01-01 00:00:01 | ms | 1,000 | One second |
2024-01-15 12:00:00 | ms | 1,705,320,000,000 | Recent date |
1969-12-31 23:59:59 | ms | -1,000 | Pre-epoch |
Key concepts:
- Positive values: Times after epoch
- Negative values: Times before epoch
- Precision affects number size
- UTC-based calculation
Common applications:
- System timestamps
- Time difference calculations
- Event sequencing
- Data synchronization
- Performance measurement
- Historical analysis
Transforms
[, ...]Select
columnDateTime column to measure from epoch. Values should be UTC or explicitly timezone-aware for consistent results. Non-UTC times are converted to UTC before calculation.
Unit
enumPrecision level for duration measurement. Higher precision produces larger numbers but allows finer time resolution.
Millisecond precision (10⁻³ seconds). Common for:
- Web applications
- Database timestamps
- User interaction timing Range: ±292 million years from epoch
Microsecond precision (10⁻⁶ seconds). Suitable for:
- System performance analysis
- High-resolution logging
- Process timing Range: ±292,000 years from epoch
Nanosecond precision (10⁻⁹ seconds). Used for:
- Scientific measurements
- Hardware timing
- Ultra-precise intervals Range: ±292 years from epoch
AsColumn
nameName for the new column. If not provided, the system generates a unique name. If AsColumn
matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.