Le programme ci-dessous montre comment convertir une date DS2 en SAS Date. Nous utilisons la fonction DS2 to_double :
Source : Converting a Date Value to a SAS Date Value
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
proc ds2;
data _null_;
dcl date maDateDs2;
dcl double maDateSAS;
method init();
maDateDs2=date'2018-12-25';
maDateSAS=to_double(maDateDs2);
put maDateSAS=;
end;
enddata;
run;
quit;
data _null_;
dcl date maDateDs2;
dcl double maDateSAS;
method init();
maDateDs2=date'2018-12-25';
maDateSAS=to_double(maDateDs2);
put maDateSAS=;
end;
enddata;
run;
quit;
Source : Converting a Date Value to a SAS Date Value







