How to read other language date with format and informat?

57 Views Asked by At

The saved dates in dataset are in German language: 12Mai2022 02Okt2020 06Dez2022

How convert/read such dates in sas with format and informat?

1

There are 1 best solutions below

0
Stu Sztukowski On

Set your locale to German_Germany and use the nldate. informat.

options locale=German_Germany;

data want;
    date = input('12Mai2022', nldate.);

    format date date9.;
run;

Output:

date
12MAY2022