pub fn format_time_dialect(
format_str: &str,
source_dialect: Dialect,
target_dialect: Dialect,
) -> StringExpand description
Convert a time format string from one SQL dialect to another.
This is the main entry point for dialect-to-dialect format conversion.
§Arguments
format_str- The format string to convertsource_dialect- The source SQL dialecttarget_dialect- The target SQL dialect
§Returns
The converted format string appropriate for the target dialect.
§Example
use sqlglot_rust::dialects::time::format_time_dialect;
use sqlglot_rust::Dialect;
// Convert MySQL format to PostgreSQL
let result = format_time_dialect("%Y-%m-%d %H:%i:%s", Dialect::Mysql, Dialect::Postgres);
assert_eq!(result, "YYYY-MM-DD HH24:MI:SS");