BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Nietzsche
Lapis Lazuli | Level 10

Hi I am reading the specialist prep guide, on page 263, there is a TODAYDATE function, I googled it and can not find any info on it and dismissed it as one of the many errors in the book.

 

Nietzsche_0-1668486428750.png

then I saw it again in the official SAS syntax reference guide, along with TODAY and DATE function.

 

Nietzsche_1-1668486588306.png

so is like TODAYDATE() a retired function or something or just typo in two official SAS materials?

 

SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).
1 ACCEPTED SOLUTION

Accepted Solutions
LinusH
Tourmaline | Level 20

Yes, it's either TODAY() or its alias DATE() that you can use.

Data never sleeps

View solution in original post

8 REPLIES 8
LinusH
Tourmaline | Level 20

Yes, it's either TODAY() or its alias DATE() that you can use.

Data never sleeps
Patrick
Opal | Level 21

The functions are date() or today()

There is no function todaydate() - at least not in a recent SAS version and I also can't remember having it ever used in the past.

SAS is highly backward compatible. If this function ever existed then it must be a looong time/many versions ago.

 

 

You can easily test what works just by trying.

Patrick_0-1668505334897.png

 

Nietzsche
Lapis Lazuli | Level 10

well did try, but I wasn't sure it is just a legacy function or something. Since what are the chances of error in two official SAS documents?

SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).
Patrick
Opal | Level 21

"Since what are the chances of error in two official SAS documents"

Slim - but from the looks of it you found one.

Suggest you raise a SAS Tech Support track so this gets fixed.

FreelanceReinh
Jade | Level 19

@Nietzsche wrote:

Since what are the chances of error in two official SAS documents?


The document that you called "official SAS syntax reference guide" is just supplementary material to the SAS Certified Specialist Prep Guide (see https://support.sas.com/en/books.html; there is also an errata document available), most likely created using that book, not independently. Given that there are a number of errata in the book, it's not surprising that the "syntax reference guide" has a few errors, too. Here's another one: In section "Creating User-Defined Formats" it says "LIBRARY=FMTLIB", but FMTLIB is a separate option (not needed for creating formats) of the PROC FORMAT statement and not a typical value of the LIBRARY= option.

 

Most reliable is the actual SAS documentation.

Nietzsche
Lapis Lazuli | Level 10
In section "Creating User-Defined Formats" it says "LIBRARY=FMTLIB", but FMTLIB is a separate option (not needed for creating formats) of the PROC FORMAT statement and not a typical value of the LIBRARY= option.

There is no section called " Creating User-Defined Formats with Variables" in the specialist prep guide. Did you mean " Displaying User-Defined Formats" on page 235?

 

I just searched entire book, find result did not turn up anything with LIBRARY=FMTLIB. Perhaps you remembered wrong?

Nietzsche_0-1668511469729.png

 

 

 

 

SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).
FreelanceReinh
Jade | Level 19

@Nietzsche wrote:
In section "Creating User-Defined Formats" it says "LIBRARY=FMTLIB", but FMTLIB is a separate option (not needed for creating formats) of the PROC FORMAT statement and not a typical value of the LIBRARY= option.

There is no section called " Creating User-Defined Formats with Variables" in the specialist prep guide. Did you mean " Displaying User-Defined Formats" on page 235?

No, I meant the supplementary two-page "Syntax Reference Guide", bottom half of page 1, right column. I don't have the prep guide.

PaigeMiller
Diamond | Level 26

Hello, @Nietzsche you can just try this function in SAS and SAS will tell you whether or not the function exists. No need to ask here in this forum, and SAS will give you much faster answers than this forum.

--
Paige Miller

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 8 replies
  • 743 views
  • 3 likes
  • 5 in conversation