<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to inquire specific date? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546623#M151370</link>
    <description>&lt;P&gt;I use the datelist below to do the array, I found nothing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if Datelist(i) = '01JAN8888'd;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;No matter is before the formatting or after formatting.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
	set have (keep = &amp;amp;DateVars. );
	array Datelist(*) &amp;amp;DateVars.;
	do i=1 to dim (Datelist);
	if Datelist(i) = '01JAN8888'd;
	end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 27 Mar 2019 18:17:24 GMT</pubDate>
    <dc:creator>ybz12003</dc:creator>
    <dc:date>2019-03-27T18:17:24Z</dc:date>
    <item>
      <title>How to inquire specific date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546571#M151340</link>
      <description>&lt;P&gt;Hi all:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a dataset which contain several date variables.&amp;nbsp;&amp;nbsp; In these variables,&amp;nbsp; I formatted one specific date from 01/01/8888 to 88/88/8888.&amp;nbsp;&amp;nbsp; After formatting, I am try to search the modified date.&amp;nbsp;&amp;nbsp; The codes seems not working.&amp;nbsp;&amp;nbsp; Please help.&amp;nbsp; Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let DateVars = culturedate dischargedate admitdate EDadmitdate;

proc format ;
 value NewDate 
  '01JAN8888'd = '88/88/8888'
  other=[mmddyy10.];
run;

proc datasets lib=work nolist;
  	modify have;
  	  format &amp;amp;DateVars. NewDate10. ;
run;
quit;

data want;
    set have;&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN class="token statement"&gt;array&lt;/SPAN&gt; datelist&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;*&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;dateVars&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;	do i&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt; to &lt;SPAN class="token function"&gt;dim&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;datelist&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="token keyword"&gt;	if&lt;/SPAN&gt; datelist &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;i&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;88/88/8888&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;     end&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
  run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Mar 2019 15:59:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546571#M151340</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2019-03-27T15:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to inquire specific date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546573#M151341</link>
      <description>&lt;P&gt;You may find this helpful:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would probably find that date by checking if the year was 8888.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if year(date) = 8888 then ...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a dataset which contain several date variables.&amp;nbsp;&amp;nbsp; In these variables,&amp;nbsp; I formatted one specific date from 01/01/8888 to 88/88/8888.&amp;nbsp;&amp;nbsp; After formatting, I am try to search the modified date.&amp;nbsp;&amp;nbsp; The codes seems not working.&amp;nbsp;&amp;nbsp; Please help.&amp;nbsp; Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let DateVars = culturedate dischargedate admitdate EDadmitdate;

proc format ;
 value NewDate 
  '01JAN8888'd = '88/88/8888'
  other=[mmddyy10.];
run;

proc datasets lib=work nolist;
  	modify have;
  	  format &amp;amp;DateVars. NewDate10. ;
run;
quit;

data want;
    set have;&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN class="token statement"&gt;array&lt;/SPAN&gt; datelist&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;*&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;dateVars&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;	do i&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt; to &lt;SPAN class="token function"&gt;dim&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;datelist&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="token keyword"&gt;	if&lt;/SPAN&gt; datelist &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;i&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;88/88/8888&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;     end&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
  run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 16:05:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546573#M151341</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-03-27T16:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to inquire specific date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546587#M151347</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your date value is still&amp;nbsp;01JAN8888. The format prints it as 88/88/8888, but your check is against the value, not the formatted value, so it should work if you changed your check to&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;    array datelist(*) &amp;amp;dateVars;	do i=1 to dim(datelist);	if datelist (i) = '01jan8888'd;     end;
  run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 16:34:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546587#M151347</guid>
      <dc:creator>ErikLund_Jensen</dc:creator>
      <dc:date>2019-03-27T16:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to inquire specific date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546595#M151354</link>
      <description>&lt;P&gt;As posted already, you can either chek the date itself by:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if datelist(i) = '01JAN888'd&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or check the formated value by:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if put(datelist(i), newdate.) = '88/88/888'&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Pay attention: while the original date is numeric type, the formated date is character type and need be quoted.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 16:59:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546595#M151354</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-03-27T16:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to inquire specific date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546605#M151357</link>
      <description>&lt;PRE&gt;if  VVALUE(datelist (i) ) = '88/88/8888'; &lt;/PRE&gt;
&lt;P&gt;Another way.&lt;/P&gt;
&lt;P&gt;The VVALUE function will return the formatted value of a variable or a variable referenced as an array element.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 17:21:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546605#M151357</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-27T17:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to inquire specific date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546621#M151368</link>
      <description>&lt;P&gt;Hi Ballardw:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use the Vvalue function,&amp;nbsp; I found out it work on single variable, not a whole bunch of list.&amp;nbsp;&amp;nbsp; Please advice how to fix it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want_single;
	set have (keep = &amp;amp;DateVars. );

	if  VVALUE(Date1) = '88/88/8888'; 

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I use it in the macro, it didn't work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let DateVars = Date1 Date2 Date3 Date4 Date5;

proc format ;
 value NewDate 
  '01JAN8888'd = '88/88/8888'
  other=[mmddyy10.];
run;

proc datasets lib=work nolist;
  	modify have;
  	format &amp;amp;DateVars. NewDate10. ;
run;
quit;

data want;
	set have (keep = &amp;amp;DateVars. );

	array Datelist(*) &amp;amp;DateVars.;	
	do i=1 to dim(Datelist);	
	if  VVALUE(&amp;amp;DateVars. ) = '88/88/8888'; 

	end;

run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Mar 2019 18:02:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546621#M151368</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2019-03-27T18:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to inquire specific date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546623#M151370</link>
      <description>&lt;P&gt;I use the datelist below to do the array, I found nothing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if Datelist(i) = '01JAN8888'd;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;No matter is before the formatting or after formatting.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
	set have (keep = &amp;amp;DateVars. );
	array Datelist(*) &amp;amp;DateVars.;
	do i=1 to dim (Datelist);
	if Datelist(i) = '01JAN8888'd;
	end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Mar 2019 18:17:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546623#M151370</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2019-03-27T18:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to inquire specific date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546631#M151373</link>
      <description>&lt;P&gt;It seems that none of the dates in your data is 01/01/8888 or&lt;/P&gt;
&lt;P&gt;maybe the datelist isn't full. Are there more date variables? or&lt;/P&gt;
&lt;P&gt;is your dataset empty?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please post your full log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 18:53:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546631#M151373</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-03-27T18:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to inquire specific date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546635#M151376</link>
      <description>&lt;P&gt;I have 10K obs in the dataset, and I used ' Proc sort, by date, '.&amp;nbsp;&amp;nbsp; I could see many '01/01/8888' obs.&amp;nbsp; However, I could not find it by using array.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 19:03:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546635#M151376</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2019-03-27T19:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to inquire specific date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546650#M151384</link>
      <description>&lt;P&gt;I have created a sample of one observation.&lt;/P&gt;
&lt;P&gt;Next code is tested and selects the wanted record.&lt;/P&gt;
&lt;P&gt;Assuming you may have more of one date = 01/01/888 in the same observation,&lt;/P&gt;
&lt;P&gt;I assigned a flag to check is there any such date.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let DateVars = culturedate dischargedate admitdate EDadmitdate;

proc format ;
 value NewDate 
  '01JAN8888'd = '88/88/8888'
  other=[mmddyy10.];
run;

data have;
 culturedate = '01jan2000'd;
 dischargedate = '01jan2050'd;
 admitdate   = '01jan8888'd;
 EDadmitdate   = .;
 output;
run;

proc datasets lib=work nolist;
  	modify have;
  	  format &amp;amp;DateVars. NewDate10. ;
run;
quit;
proc contents data=have; run;

data want;
    set have;
    array datelist(*) &amp;amp;dateVars;
    flag=0;
	do i=1 to dim(datelist);
	   dt = datelist(i); put i= dt=;
	   if dt = '01jan8888'd then flag=1;
   end;
   if flag;
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Mar 2019 19:37:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546650#M151384</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-03-27T19:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to inquire specific date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546651#M151385</link>
      <description>&lt;P&gt;Did you read the paper I linked to above? It's very, very helpful here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
	set have (keep = &amp;amp;DateVars. );
	array Datelist(*) &amp;amp;DateVars.;

	do i=1 to dim (Datelist) while(flag ne 0);
	             if year(datelist(i)) = 8888 then flag=1;
	end;


      if flag=1;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have 10K obs in the dataset, and I used ' Proc sort, by date, '.&amp;nbsp;&amp;nbsp; I could see many '01/01/8888' obs.&amp;nbsp; However, I could not find it by using array.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 19:38:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546651#M151385</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-03-27T19:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to inquire specific date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546653#M151386</link>
      <description>&lt;P&gt;I have created a sample of one observation.&lt;/P&gt;
&lt;P&gt;Next code is tested and selects the wanted record.&lt;/P&gt;
&lt;P&gt;Assuming you may have more of one date = 01/01/888 in the same observation,&lt;/P&gt;
&lt;P&gt;I assigned a flag to check is there any such date.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let DateVars = culturedate dischargedate admitdate EDadmitdate;

proc format ;
 value NewDate 
  '01JAN8888'd = '88/88/8888'
  other=[mmddyy10.];
run;

data have;
 culturedate = '01jan2000'd;
 dischargedate = '01jan2050'd;
 admitdate   = '01jan8888'd;
 EDadmitdate   = .;
 output;
run;

proc datasets lib=work nolist;
  	modify have;
  	  format &amp;amp;DateVars. NewDate10. ;
run;
quit;
proc contents data=have; run;

data want;
    set have;
    array datelist(*) &amp;amp;dateVars;
    flag=0;
	do i=1 to dim(datelist);
	   dt = datelist(i); put i= dt=;
	   if dt = '01jan8888'd then flag=1;
   end;
   if flag;
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Mar 2019 19:39:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546653#M151386</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-03-27T19:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to inquire specific date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546656#M151388</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/67134"&gt;@ybz12003&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Ballardw:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use the Vvalue function,&amp;nbsp; I found out it work on single variable, not a whole bunch of list.&amp;nbsp;&amp;nbsp; Please advice how to fix it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want_single;
	set have (keep = &amp;amp;DateVars. );

	if  VVALUE(Date1) = '88/88/8888'; 

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I use it in the macro, it didn't work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let DateVars = Date1 Date2 Date3 Date4 Date5;

proc format ;
 value NewDate 
  '01JAN8888'd = '88/88/8888'
  other=[mmddyy10.];
run;

proc datasets lib=work nolist;
  	modify have;
  	format &amp;amp;DateVars. NewDate10. ;
run;
quit;

data want;
	set have (keep = &amp;amp;DateVars. );

	array Datelist(*) &amp;amp;DateVars.;	
	do i=1 to dim(Datelist);	
	if  VVALUE(&amp;amp;DateVars. ) = '88/88/8888'; 

	end;

run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Wrong syntx. VVALUE(&amp;amp;datevars.) is going to resolve to VVALUE( date1 date2 date3 date4 date5). The function documentation says a SINGLE variable or a SINGLE array reference.&lt;/P&gt;
&lt;PRE&gt;data want;
	set have (keep = &amp;amp;DateVars. );

	array Datelist(*) &amp;amp;DateVars.;	
	do i=1 to dim(Datelist);	
	if  VVALUE(datelist[i] ) = '88/88/8888'; 

	end;

run;
&lt;/PRE&gt;
&lt;P&gt;would be the way to compare each element of the array to the value.&lt;/P&gt;
&lt;P&gt;Of course you don't indicate what you want to do when the match(es) are found. Your example data step will only have any observations in the output if ALL of the date variables in the array have the tested value.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 19:50:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-inquire-specific-date/m-p/546656#M151388</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-27T19:50:09Z</dc:date>
    </item>
  </channel>
</rss>

