I have a date vaiable extracted from SQL server (in SQL datatype is datetime2(7)), sas reading it as $27. example data value: (2015-06-09 14:20:00.0000000).
what is this data type called. how can I convert to numeric datetime20.? appreciate you help.
How are you reading your data from SQL Server? If you are using ODBC, we found that using the latest version of the SQL Server ODBC driver translated datetimes correctly as datetimes not character:
40080 - SQL Server 2008 dates are read in as character when using SAS/ACCESS® Interface to ODBC
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.