DATA Step, Macro, Functions and more

How to convert character with € symbol format to numeric format?

Reply
Occasional Contributor
Posts: 10

How to convert character with € symbol format to numeric format?

Hello,

 

I need to transform a variable character with € symbol to numeric formal. Like this:

 

Outstanding_Old             Outstanding_New

110,817.70€                      110,817.70

 46,273.19€                         46,273.19

 61,234.99€                         61,234.99

 88,841.87€                         88,841.87

 

Thanks,

mgrd

Trusted Advisor
Posts: 1,137

Re: How to convert character with € symbol format to numeric format?

Please try

 


data have;
input Outstanding_Old$20.;
inf=input(compress(Outstanding_Old,'€'),euro10.2);
format inf comma10.2;
cards;
110,817.70€                     
46,273.19€                     
61,234.99€                     
88,841.87€   
; 
Thanks,
Jag
Occasional Contributor
Posts: 10

Re: How to convert character with € symbol format to numeric format?

Posted in reply to Jagadishkatam

Thanks Jag, It works!

Ask a Question
Discussion stats
  • 2 replies
  • 248 views
  • 0 likes
  • 2 in conversation