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.

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