I'm quite new to SAS and did some in a dataset which I want to clean.
I have a dataset as shown below. The record shown is the one I want to delete from the dataset.
I want to get a program to clean my testing, but want it be based on date (datum), time (Tijd) and name (Mailing)
I was thinking that below programcode would do the trick
DATA Datasettest2;
set Datasettest;
IF MAILING EQ 'ZM0000' AND Datum EQ "11jan2022"d AND Tijd EQ "16:49:24"T THEN DELETE;
RUN;
Unfortunately the program runs and the line is still there afterwards.
If I just search for date (datum) and name (Mailing) it works, but I want to be more specific with a timestamp added to preserve certain lines.
DATA Datasettest2;
set Datasettest;
IF MAILING EQ 'ZM0000' AND Datum EQ "11jan2022"d THEN DELETE;
RUN;
I am assuming there must me something with the time part as this doesn't work.
I am specially looking for this time field to match, not to look for alternate solutions based on other fields.
I did a proc content and below is shown from the dataset. Maybe this could help?