Expand description
Time format conversion utilities
This module provides functionality for converting time format strings between different SQL dialects. For example, converting Python strftime formats to Snowflake or BigQuery formats.
Based on the Python implementation in sqlglot/time.py.
Modules§
- format_
mappings - Common format mapping for Python strftime to various SQL dialects
Statics§
- TIMEZONES
- Set of valid timezone names (lowercase)
Functions§
- build_
format_ trie - Build a trie from format mapping keys
- format_
time - Convert a time format string using a dialect-specific mapping
- is_
valid_ timezone - Check if a string is a valid timezone name
- subsecond_
precision - Extract subsecond precision from an ISO timestamp literal