I have a WORK dataset with more than 30 columns but only 2 columns out of them are date fields. (Start date and End date). I want the date format in the permanent dataset to be in date. and not in yymmdd10. which is the current format in work dataset. When I used the below code, the two date fields are taking first two positions. I dont want to reorder the positions and at the same time dont want to mention the format with all 30+ columns. Could someone please help me if there is any way for this?
data DLR.DEALER;
set work.dealer_invoices; * this dataset contains more than 30 columns;
format start_dt end_dt date.;
run;
I could not find any solution for this on our site. Any help is highly appreciated than just asking me to mention all the columns in the format statement :) Thanks in advance.
format
statement would have any effect on variable ordering as it is after theset
statement. I can't replicate your problem with the information given. – DWalstart_dt
andend_dt
to be the first columns in yourDLR.DEALER
data set, right? Then you belive that theformat
line changes the order from the original order inwork.dealer_invoices
, but in the same time you say that the result ofproc contents data=work.dealer_invoices; run;
listsstart_dt
andend_dt
as numer one and two respecitvely inAlphabetic List of Variables and Attributes
. Does this not mean that they are first in this dataset from the beginning? Ergo, no change in order. – D. Josefsson