I looking at grabbing some files based the modification date and trying this with dirlistwin. How do I get dirlistwin to recognize the modification date. My goal is to grab files that are less than 5 day old.
You will need to modify the macro to get the date modified rather than the date created. Use the dir /? command to see the syntax you need to change for your version of windows. Then modify the first filename command in the macro.
In the macro world you will have to force the conversion of the data constant.
One way to do this is with the PUTN function.
[pre]%macro test(now, then);
%put now &now;
%put then &then;
When I want to edit the date value in macro logic I tend to use the intnx function like in
%let my_date = %sysfunc(intnx(day,"&sysdate"d,-5),ddmmyyp10.) ;
(where I know that syntactically the dot after the format name ain't needed)