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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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