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
J T [ Mo, 03 Dezember 2007 10:45 ] [ ID #1884526 ]

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"
bill [ Mo, 03 Dezember 2007 18:52 ] [ ID #1884530 ]

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
J T [ Mo, 03 Dezember 2007 22:03 ] [ ID #1884534 ]

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
bobemery [ Di, 04 Dezember 2007 08:38 ] [ ID #1885315 ]

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
bobemery [ Di, 04 Dezember 2007 09:08 ] [ ID #1885318 ]
Datenbanken » comp.databases.filemaker » Time intervel calculation

Vorheriges Thema: Go to certain TAB on specific LAYOUT
Nächstes Thema: anomalies in simple ESS