Desktop productivity for business analysts and programmers

Using the DATE() or TODAY() Function When Filtering in SAS EG 4.1

Reply
N/A
Posts: 0

Using the DATE() or TODAY() Function When Filtering in SAS EG 4.1

All,

I am rookie SAS EG user and cannot figure out how to set a query filter for all rows containing today's date. The field data is datetime, any suggestions would be very appreciated.

MC
Super Contributor
Super Contributor
Posts: 3,174

Re: Using the DATE() or TODAY() Function When Filtering in SAS EG 4.1

The sample below has some discussion regarding variable types - you will need to use DATEPART() and either the TODAY() function or in some instances the constant "&SYSDATE9"D may be preferred.

Scott Barry
SBBWorks, Inc.

Sample 35315: Converting Variable Types in SAS® Enterprise Guide
http://support.sas.com/kb/35/315.html
N/A
Posts: 0

Re: Using the DATE() or TODAY() Function When Filtering in SAS EG 4.1

Many thanks DATEPART() worked like a charm. I was able to create an indicator based on that logic. Your assistance is much appreciated.
Ask a Question
Discussion stats
  • 2 replies
  • 719 views
  • 1 like
  • 2 in conversation