date type in ODBC
Hi,
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?
Stephen
Discussion (3)0
Comments
$ZDATETIME($NOW(),3) should fit. You then have the Seconds too.
Awesome - thank you!
$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. Ex.
w $ZDT($H,3) 2019-02-02 10:25:58
w $ZDT($Now(),3) 2019-02-02 10:27:20