01-10-2016 11:00 PM
sas 9.2, sql server 2008 r2,odbc=sql server native client 10.0
data destlib.tab; --sql server database
set sourcelib.tab; --local sas dataset
one column in sourcelib.tab is time8 type with values such as 17:37:33. after running the script above, the column in the sql server database has type datetime2(0) and the value becomes 1960-01-01 17:37:33.
sas 9.4, sql server 2012, odbc=sql server native client 11.0
the column in the sql server database becomes time(7) with the value 17:37:33.0000000
Could someone please tell me why the first scenario happens and where the control is? Thanks
01-11-2016 12:18 AM
Thanks for your reply. Do you know why the first case happened? is it because of some sort of default option?
01-11-2016 11:47 AM
I don't know. To SAS, TIME. and DATETIME. are representations of the same quantity : the number of seconds since 01JAN1960:00:00:00. I guess things just got more sophisticated between versions 9.2 and 9.4.