SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

DI Studio - Extract transformation - filtering by dates

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

DI Studio - Extract transformation - filtering by dates

[ Edited ]

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?


Accepted Solutions
Solution
‎11-09-2017 05:16 AM
Super User
Posts: 20,222

Re: SAS DI - Extract transformation - filtering by dates

Posted in reply to Peter_Wine

Date literals are in the Date9 Format:

 

 

My_Date = '08Nov2017'd;

View solution in original post


All Replies
Solution
‎11-09-2017 05:16 AM
Super User
Posts: 20,222

Re: SAS DI - Extract transformation - filtering by dates

Posted in reply to Peter_Wine

Date literals are in the Date9 Format:

 

 

My_Date = '08Nov2017'd;
Occasional Contributor
Posts: 5

Re: SAS DI - Extract transformation - filtering by dates

Hi Reeza, Thanks, it works! :-)
Super Contributor
Posts: 451

Re: SAS DI - Extract transformation - filtering by dates

Posted in reply to Peter_Wine

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.

Super User
Posts: 5,490

Re: SAS DI - Extract transformation - filtering by dates

Posted in reply to jklaverstijn

Being bit picky, but it's from 01Jan1960....Man Tongue

Data never sleeps
Super Contributor
Posts: 451

Re: DI Studio - Extract transformation - filtering by dates

Posted in reply to Peter_Wine
You're not picky at all @LinusH. These details make all the difference. I stand corrected. 33 year of SAS just doesn't outweigh 40 years of Unix :-).
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 167 views
  • 0 likes
  • 4 in conversation