| Date: | Sun, 7 Oct 2007 10:59:16 -0700 |
| Reply-To: | gealnidk <adsense@FAMNISSEN.DK> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | gealnidk <adsense@FAMNISSEN.DK> |
| Organization: | http://groups.google.com |
| Subject: | Re: Conveting military time to standard time |
|
| In-Reply-To: | <b674f2920710060916x32de1c39s888fa532ce27e4e4@mail.gmail.com> |
| Content-Type: | text/plain; charset="us-ascii" |
|---|
> Any suggestions on how to convert military time to standard time? Examples:
>
> 1330 = 1:30
> 0945 = 9:45
Don't do the math yourself, always use SAS ;-)
data time;
m1="1330";
m2=substr(m1,1,2) ! ! ":" !! substr(m1,3,2);
time=input(m2,time5.);
put time time10.;
run;
|