date type in ODBC


I'm writing to an ODBC connection to a SQLserver database, and I seem to be sending the wrong data type to a date colum?

set tSC = ..Adapter.ExecuteUpdate(.intRows,sqlInsert,$ZDATETIME($NOW(),3,2), pRequest.ComposerName, [...])

I think  `$ZDATETIME($NOW(),3,2)` is ODBC datetime format:

Do I have it wrong?



$Now() gives you output in different format.
ODBC date format is 3. When dformat is 3 then ODBC date separator ( '-' ) is used. For all other date format space is used as a date separator.
Instead of $Now() you can use $H also.
1. w $ZDT($H,3)
2019-02-02 10:25:58

  1. w $ZDT($Now(),3)
    2019-02-02 10:27:20