DATA Step, Macro, Functions and more

Localize DATE system option

Accepted Solution Solved
Reply
Regular Contributor
Posts: 182
Accepted Solution

Localize DATE system option

Hi,

the DATE system option causes the SAS session start date and time to be printed on SAS output.

Is it possible to display this date in another language?

-Bart


Accepted Solutions
Solution
‎03-07-2012 11:50 AM
Trusted Advisor
Posts: 1,300

Localize DATE system option

try using local=dutch_netherlands (alias: nl_nl, dutch, nl) or duth_belguim (alias: nl_be) with dflang=dutch or locale, if using locale make sure it is set after the local is set or it will use the original locale instead of the updated.  This would probably be why you are experiencing trouble as far as I know.

options local=nl dflang=dutch /*option 1*/;

*options dflang=locale; /*option 2*/

setting local also alters your definitions for encoding and papersize, so be aware of possible consequences.

View solution in original post


All Replies
PROC Star
Posts: 7,363

Localize DATE system option

One way to change it is by changing the format used in the template for the proc.  Is the language you want one of the ones shown in the date formats shown at: http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003168458.htm

?

Regular Contributor
Posts: 182

Localize DATE system option

thanks but too complicated.

a colleague got it working with options options locale=dutch and options dflang=locale.

it works in our test environment but not in production, don't know why yet.

Solution
‎03-07-2012 11:50 AM
Trusted Advisor
Posts: 1,300

Localize DATE system option

try using local=dutch_netherlands (alias: nl_nl, dutch, nl) or duth_belguim (alias: nl_be) with dflang=dutch or locale, if using locale make sure it is set after the local is set or it will use the original locale instead of the updated.  This would probably be why you are experiencing trouble as far as I know.

options local=nl dflang=dutch /*option 1*/;

*options dflang=locale; /*option 2*/

setting local also alters your definitions for encoding and papersize, so be aware of possible consequences.

Super User
Posts: 9,681

Localize DATE system option

I perfer to the way mentioned by Art.

The format is used like other normal format , if the sas is dutch version .

Ksharp

Regular Contributor
Posts: 182

Localize DATE system option

downside of this is that you have to do it for every proc that you use, and that it involves proc template, which I find utterly complicated.

Regular Contributor
Posts: 182

Localize DATE system option

thanks, this works.

my code:

options locale=nl dflang=locale;

proc print data=sashelp.class;

run;

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 150 views
  • 0 likes
  • 4 in conversation