Tejashree Thorat
Tejashree Thorat

Reputation: 11

How to read other language date with format and informat?

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

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

Upvotes: 1

Views: 68

Answers (1)

Stu Sztukowski
Stu Sztukowski

Reputation: 12909

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

Upvotes: 1

Related Questions