Strftime / Temporal Layer
Format datetime values into strings using chrono's strftime patterns. Converts temporal values to customized string representations.
Common format patterns (chrono compatible):
Pattern | Result | Description | Example |
---|---|---|---|
%Y-%m-%d | 2024-01-15 | ISO date | Reports, APIs |
%B %-d, %Y | January 15, 2024 | Long date | User displays |
%H:%M:%S | 14:30:45 | 24-hour time | Logs, timestamps |
%I:%M %p | 02:30 PM | 12-hour time | User interfaces |
%v | 15-JAN-2024 | Unix date | System logs |
Key chrono format codes:
- %Y: Year with century (2024)
- %m: Month as zero-padded number (01-12)
- %-m: Month as decimal number (1-12)
- %B: Full month name (January)
- %b, %h: Abbreviated month name (Jan)
- %d: Day as zero-padded number (01-31)
- %-d: Day as decimal number (1-31)
- %H: Hour in 24-hour format (00-23)
- %I: Hour in 12-hour format (01-12)
- %M: Minute as zero-padded number (00-59)
- %S: Second as zero-padded number (00-59)
- %f: Microsecond as zero-padded number (000000)
- %Z: Time zone name (UTC, EST, etc.)
- %z: UTC offset (+0000, -0400, etc.)
Special chrono modifiers:
- '-': Remove leading zeros (%-d → 5 instead of %d → 05)
- '_': Pad with spaces (%_d → ' 5' instead of %d → '05')
Common applications:
- Report generation
- Data export
- Log formatting
- User display
- File naming
- API responses
Table
0
0
Table
Select
columnDatetime column to format. Supports temporal types compatible with chrono:
- Date (date-only values)
- Time (time-only values)
- DateTime (full timestamps with optional timezone) Each value will be formatted according to the specified pattern.
Format
stringchrono strftime format string specifying output format. Common patterns:
- '%F': ISO 8601 date (%Y-%m-%d)
- '%T': 24-hour time (%H:%M:%S)
- '%+': ISO 8601 date and time with timezone
- '%R': 24-hour HH:MM time
- '%r': 12-hour time with AM/PM Refer to chrono::format::strftime documentation for full specification.
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.