Hi All, I want to make a job in SAS DI Studio. Very simple transformation. I've got SAS table and want to use "Extract" transformation to extract data from it. In tab "Where" in Extract transformation I want to filter records by column "My_Date" which is in format yymmdd10. Conditions: -> My_Date = 2017-11-08 -> My_Date = '2017-11-08'd. -> My_Date = "2017-11-08"d. don't work. What is the proper condition?
Date literals are in the Date9 Format:
My_Date = '08Nov2017'd;
To expand on @Reeza's correct response: date, time and datetime values are never stored "in a format". They are always a number counting days or seconds from 01JAN1970. The format is merely an indicator that tells SAS how to present the value and this can be changed at will. So the format does not dictate how to formulate a constant in the WHERE clause. It is always as @Reeza explained.
Regards,
- Jan.
Being bit picky, but it's from 01Jan1960....
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.