• Sorry Alan, didn't read your response close enough first time.

    Alan.B (7/25/2013)


    Tobar (7/25/2013)


    Anyone point me to the documentation, or explain why you would expect these results?

    DECLARE @d DATETIME = '07/25/2013 10:11:12.345';

    SELECT FORMAT ( @d, 'yyyy dd mm hh mm ss')

    2013 25 11 10 11 12

    (I am passing it the modifier "mm" twice. The first time it is interpretted as month the second as minute.)

    Anyhow, I didn't completely get what you are asking here but... MM=month; mm=minute

    This:

    DECLARE @d DATETIME = '07/25/2013 10:11:12.345';

    SELECT FORMAT ( @d, 'yyyy dd MM hh mm ss')

    ...will get you this:

    2013 25 07 10 11 12

    That is just it. I us mm twice in my string. The first time it interprets it as MM (supposedly "hour") the second time as mm (supposedly minute).

    <><
    Livin' down on the cube farm. Left, left, then a right.