☑ This topic is solved.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 12-11-2024 08:18 AM
(911 views)
Hello Experts,
I'm getting the month name applying the function monname : put(datepart(mon_jour),monname.) .
Do you know, please, how to display the month in French ?
Thank you for your help !
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
options LOCALE=fr_FR;
data _null_;
mon_jour=datetime();
x = put(datepart(mon_jour),NLDATEMN.);
put x=;
run;
options LOCALE=en_US;
_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug
"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings
SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug
"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings
SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
options LOCALE=fr_FR;
data _null_;
mon_jour=datetime();
x = put(datepart(mon_jour),NLDATEMN.);
put x=;
run;
options LOCALE=en_US;
_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug
"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings
SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug
"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings
SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Yabwon!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
options locale=fr_FR;
data fake;
today=today();
want=put(today,NLDATEMN.) ;
run;
--
Paige Miller
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Good to know. And NLDATENM does not have MONNAME's nasty habit of right aligning the text.
data months;
do mofy=1 to 12;
date=mdy(mofy,1,2024);
month=put(date,monname.);
month2=put(date,nldatemn.);
output;
end;
format date yymmdd10.;
run;
proc print ;
format _character_ $quote.;
run;
Obs mofy date month month2 1 1 2024-01-01 " January" "January" 2 2 2024-02-01 " February" "February" 3 3 2024-03-01 " March" "March" 4 4 2024-04-01 " April" "April" 5 5 2024-05-01 " May" "May" 6 6 2024-06-01 " June" "June" 7 7 2024-07-01 " July" "July" 8 8 2024-08-01 " August" "August" 9 9 2024-09-01 "September" "September" 10 10 2024-10-01 " October" "October" 11 11 2024-11-01 " November" "November" 12 12 2024-12-01 " December" "December"