BookmarkSubscribeRSS Feed
BrahmanandaRao
Lapis Lazuli | Level 10

Hi Experts,

What is difference between worddate and nldatel formates 

Can you  explain with examples above formats

1 REPLY 1
ballardw
Super User

Obvious difference is national language rules for displaying dates.

Second  is how  a particular format will display a given value with a short length.

 

data _null_;
   d = today();
   put d= worddate10.;
   put d= worddate15.;
   put d= worddate20.;
   put d= nldate10.;
   put d= nldate15.;
run;

On my system today the log shows:

d=March
d=Mar 23, 2024
d=March 23, 2024
d=03/23/2024
d=March 23, 2024

In my default US national language support note that the Worddate examples (the first 3) pretty much start the same just adding text in different places as more character positions are specified.

NLDATE chose a very different display for the short version.

No idea what any specific other language might prefer.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 321 views
  • 2 likes
  • 2 in conversation