BookmarkSubscribeRSS Feed
HarshaChaube
Fluorite | Level 6

Hi,

 

Please help me understand the difference between date () and today () function.

Are they always the same ?

 

 

Thanks !

 

 

 

6 REPLIES 6
novinosrin
Tourmaline | Level 20

My test gives me same results

 

data w;
date1=today();
output;
put date1= ;
date1=date();
output;
put date1= ;
format date1 date9.;
run;


date1=03JUL2018
date1=03JUL2018

HarshaChaube
Fluorite | Level 6

yes, exactly. I get the same results.

But is there any scenario where they differs?

novinosrin
Tourmaline | Level 20

No idea. Both of us will have to wait for responses from somebody who knows about it.

Tom
Super User Tom
Super User

The same difference as between right Twix and a left Twix.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

The left finger, as with the right finger are both Unixes, its only when join in one packet do they become a Twix.  Being right handed, means right is always first and thus better.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 6 replies
  • 8858 views
  • 11 likes
  • 5 in conversation