DATA Step, Macro, Functions and more

the "??" date format in SAS (??ddmmyy6.)

Reply
N/A
Posts: 0

the "??" date format in SAS (??ddmmyy6.)

Hi SAS Experts!!!

I need your help regarding date format in SAS.

I am reading the date field from the file in form of Character and after certian processing, I need to validate if the field is in proper date format (DDMMYY6.)or not.

For the above purpose I am using following condition -

if (NOT missing(input(dateField, ddmmyy6.))) then


In this case I am getting expected output, but for any invalid date (e.g. 30 Feb) the log file shows a note as -
NOTE: Invalid argument to function INPUT at line 595 column 17.
date_values=300208 valid=0 new_date=. _ERROR_=1 _N_=1


However when i used the date format with ?? ( as specified below), I got the same expected result without any note or warning in log.

if (NOT missing(input(dateField, ??ddmmyy6.))) then


The log file was absolutely clean and pretty.

I got this "??" format from one of the internet site.

I really want to know what difference this ?? stuff makes to the format and if it is safe to use this format.

Request you to share the information regarding the usage and significance of this "??" .

regards
Kapil Agrawal
Super Contributor
Super Contributor
Posts: 3,174

Re: the "??" date format in SAS (??ddmmyy6.)

Posted in reply to deleted_user
Refer to SAS 9.2 Language DOC on INPUT function.

Scott Barry
SBBWorks, Inc.

http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a000180357.htm
N/A
Posts: 0

Re: the "??" date format in SAS (??ddmmyy6.)

Hi Scott.

Thank you very much.

The link mentioned by you talks exactly same what I was looking for Smiley Happy

Thnx a ton!!!


Kapil Agrawal
Ask a Question
Discussion stats
  • 2 replies
  • 198 views
  • 0 likes
  • 2 in conversation