DATA Step, Macro, Functions and more

format NLMNIEUR

Reply
Frequent Contributor
Posts: 89

format NLMNIEUR

Dear all,

In a file I receive amount is presented like below (with currency) and therefore is character.

With the locale option and this new informat I manage to read it in correctly.

But . . . is there a way to also automatically detect the currency value (now it is EUR but it can be anything)

I use now some character functions, but perhaps it can be neater !!

Regards,

Herman

options locale=Dutch_Belgium ;

data TEST;
  amount='-987.120.345,88 EUR';
  balance=input(amount,NLMNIEUR25.2);
  format balance commax25.2 ;
run;

Ask a Question
Discussion stats
  • 0 replies
  • 112 views
  • 0 likes
  • 1 in conversation