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

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1031 views
  • 1 like
  • 2 in conversation