Skip to main content

format_mysql_timestamp

Function format_mysql_timestamp 

Source
fn format_mysql_timestamp(
    y: u16,
    m: u8,
    d: u8,
    hr: u8,
    min: u8,
    sec: u8,
    micros: u32,
    precision: u32,
) -> String
Expand description

Format MySQL DATETIME/TIMESTAMP components as YYYY-MM-DD HH:MM:SS[.ffff]. micros is the raw microseconds (0..1_000_000); only the leading precision digits are kept, matching MySQL’s DATETIME(p)/TIMESTAMP(p) display.