Solved
Contributor
Posts: 43

# How to convert decimal value to exponential in SAS

hI,

My pvalue has value like : 0.000082634.

But I need to convert it into 8.26E-5. Could anyone please let me know how to do this?

Thanks,

Megha

Accepted Solutions
Solution
‎09-29-2015 03:32 PM
Valued Guide
Posts: 765

## Re: How to convert decimal value to exponential in SAS

Hi.  If you are asking how to display that value in scientific notation, use a format ...

data _null_;

x = 0.000082634;
put x e9.;
run;

If you are really asking how to convert numeric a numeric value, it's an odd question since SAS stores all numeric values in the same manner (unless you start playing with numeric value lengths).  It's just  the display of the value that you can alter.

All Replies
Solution
‎09-29-2015 03:32 PM
Valued Guide
Posts: 765

## Re: How to convert decimal value to exponential in SAS

Hi.  If you are asking how to display that value in scientific notation, use a format ...

data _null_;

x = 0.000082634;
put x e9.;
run;

If you are really asking how to convert numeric a numeric value, it's an odd question since SAS stores all numeric values in the same manner (unless you start playing with numeric value lengths).  It's just  the display of the value that you can alter.

Contributor
Posts: 43

## Re: How to convert decimal value to exponential in SAS

Thank you MikeZdeb. Yes I meant display. Your solution worked. Many thanks
Super User
Posts: 23,776