Time intervel calculation
Can someone please help me to work out the time interval between two
times on dates that may occur on different days.
Thanks in advance
John
Re: Time intervel calculation
In article
<11f65eb2-a2b5-40d9-a30a-bc7e7c625726 [at] t47g2000hsc.googlegroups.com>,
J T <jtdoherty [at] lineone.net> wrote:
> Can someone please help me to work out the time interval between two
> times on dates that may occur on different days.
>
> Thanks in advance
>
> John
Data fields:
Date1
Date2
Time1
Time2
Date1 & Date 2 defined as Date fields, Time1 & Time2 defined as Time
fields
Calculation Field
TimeDif =
(Date2-Date1) *24*60*60
+
Time2-Time1
TimeDIff field specified to give calculation result as Time
You can of course multiply out 24*60*60 and use the result as a single
multiplication factor.
--
Bill Collins
For email, change "fake" to "earthlink"
Re: Time intervel calculation
On 3 Dec, 17:52, Bill <bbcoll... [at] fake.net> wrote:
> In article
> <11f65eb2-a2b5-40d9-a30a-bc7e7c625... [at] t47g2000hsc.googlegroups.com>,
> J T <jtdohe... [at] lineone.net> wrote:
>
> > Can someone please help me to work out the time interval between two
> > times on dates that may occur on different days.
>
> > Thanks in advance
>
> > John
>
> Data fields:
> Date1
> Date2
> Time1
> Time2
>
> Date1 & Date 2 defined as Date fields, Time1 & Time2 defined as Time
> fields
>
> Calculation Field
>
> TimeDif =
> (Date2-Date1) *24*60*60
> +
> Time2-Time1
>
> TimeDIff field specified to give calculation result as Time
>
> You can of course multiply out 24*60*60 and use the result as a single
> multiplication factor.
>
> --
> Bill Collins
> For email, change "fake" to "earthlink"
Thank you very much Bill
Regards
John
Re: Time intervel calculation
J T <jtdoherty [at] lineone.net> wrote:
> On 3 Dec, 17:52, Bill <bbcoll... [at] fake.net> wrote:
> > In article
> > <11f65eb2-a2b5-40d9-a30a-bc7e7c625... [at] t47g2000hsc.googlegroups.com>,
> > J T <jtdohe... [at] lineone.net> wrote:
> >
> > > Can someone please help me to work out the time interval between two
> > > times on dates that may occur on different days.
> >
> > > Thanks in advance
> >
> > > John
> >
> > Data fields:
> > Date1
> > Date2
> > Time1
> > Time2
> >
> > Date1 & Date 2 defined as Date fields, Time1 & Time2 defined as Time
> > fields
> >
> > Calculation Field
> >
> > TimeDif =
> > (Date2-Date1) *24*60*60
> > +
> > Time2-Time1
> >
> > TimeDIff field specified to give calculation result as Time
> >
> > You can of course multiply out 24*60*60 and use the result as a single
> > multiplication factor.
> >
> > --
> > Bill Collins
> > For email, change "fake" to "earthlink"
>
> Thank you very much Bill
>
> Regards
>
> John
If you are using 7 or better and just looking for number of hours
between the two, you can use the timestamp function to combine the dates
and times and do the heavy lifting:
(Timestamp ( date1 ; time1 ) - Timestamp ( date2 ; time2 ))/3600
result as a number
Re: Time intervel calculation
Opps, my bad:
(Timestamp ( date2 ; time2 ) - Timestamp ( date1 ; time1 ))/3600
result as number
Bumper <bobemery [at] bellsouth.net> wrote:
> J T <jtdoherty [at] lineone.net> wrote:
>
> > On 3 Dec, 17:52, Bill <bbcoll... [at] fake.net> wrote:
> > > In article
> > > <11f65eb2-a2b5-40d9-a30a-bc7e7c625... [at] t47g2000hsc.googlegroups.com>,
> > > J T <jtdohe... [at] lineone.net> wrote:
> > >
> > > > Can someone please help me to work out the time interval between two
> > > > times on dates that may occur on different days.
> > >
> > > > Thanks in advance
> > >
> > > > John
> > >
> > > Data fields:
> > > Date1
> > > Date2
> > > Time1
> > > Time2
> > >
> > > Date1 & Date 2 defined as Date fields, Time1 & Time2 defined as Time
> > > fields
> > >
> > > Calculation Field
> > >
> > > TimeDif =
> > > (Date2-Date1) *24*60*60
> > > +
> > > Time2-Time1
> > >
> > > TimeDIff field specified to give calculation result as Time
> > >
> > > You can of course multiply out 24*60*60 and use the result as a single
> > > multiplication factor.
> > >
> > > --
> > > Bill Collins
> > > For email, change "fake" to "earthlink"
> >
> > Thank you very much Bill
> >
> > Regards
> >
> > John
>
> If you are using 7 or better and just looking for number of hours
> between the two, you can use the timestamp function to combine the dates
> and times and do the heavy lifting:
>
> (Timestamp ( date1 ; time1 ) - Timestamp ( date2 ; time2 ))/3600
>
> result as a number