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....
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.