[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Re: sas time value
From:       Arthur Tabachneck <art297 () NETSCAPE ! NET>
Date:       2009-10-30 22:12:16
Message-ID: c21790ec-e8ca-43a6-9098-da243e745de6 () f16g2000yqm ! googlegroups ! com
[Download RAW message or body]

Peter,

If you want the result shown in terms of hours you could just use:

data have;
  start_time="13SEP99:19:45:04"dt;
  end_time="13SEP99:23:05:36"dt;
run;

data want;
  set have;
  diff=(end_time-start_time)/(60*60);
run;

HTH,
Art
------------
On Oct 30, 4:37 pm, peter zeng <taifa.str...@gmail.com> wrote:
> I have two  datetime values such as "13SEP99:19:45:04" and
> "13SEP99:23:05:36"
> I want (13SEP99:23:05:36)minus(13SEP99:19:45:04)
> so that I can get the actural numebrs
>
> Do everyone know how to do it
>
> here is my code
> format date date9. time time8. datetime datetime16.;
> datetime=(date*24*60*60)+ time;
>
> just learn SAS
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic