BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sasuser123123
Quartz | Level 8
Hello!
I've a date 11/jul/2012

So I'm trying to convert this date to iso format.
I'm running the below program

Data new;
Set old;
DD=put(input(DD,best.),is8601dt.);
Run;

But I didn't get the out put,and the log shows invalid argument function input.

Could you please solve this query..

Thank you!
1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

This input string is clearly not a number, so the BEST. informat will fail.

Try DATE11. instead.

And the correct name of the ISO date format is either E8601DA10. (with hyphens) or B8601DA8. (without hyphens).

Maxim 1: Read the Documentation.

View solution in original post

1 REPLY 1
Kurt_Bremser
Super User

This input string is clearly not a number, so the BEST. informat will fail.

Try DATE11. instead.

And the correct name of the ISO date format is either E8601DA10. (with hyphens) or B8601DA8. (without hyphens).

Maxim 1: Read the Documentation.

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
  • 1 reply
  • 651 views
  • 1 like
  • 2 in conversation