How to calculate number of days between dates?

  • Follow


Anyone?
I have a simple database in Filemaker Pro 6.0 that has a "start date" field
and an "ending date" field.
I need a "number of days" field that gives me the total number of days
between these dates. (including weekends and holidays)
Does anyone know a formula to do this?
Thanks,
Tom


0
Reply tlcmich 11/15/2004 6:15:06 PM

in article Km6md.20683$Rf1.13858@newssvr19.news.prodigy.com,
tlcmich@hotmail.com at mccordt@sbcglobal.net wrote on 11/15/04 10:15 AM:

> Anyone?
> I have a simple database in Filemaker Pro 6.0 that has a "start date" field
> and an "ending date" field.
> I need a "number of days" field that gives me the total number of days
> between these dates. (including weekends and holidays)
> Does anyone know a formula to do this?
> Thanks,
> Tom
> 
> 
End Date - Start Date

0
Reply Lee 11/15/2004 6:44:30 PM


"Lee Smith" <canepa6645@charter.net> wrote in message
news:BDBE390E.C801%canepa6645@charter.net...
> in article Km6md.20683$Rf1.13858@newssvr19.news.prodigy.com,
> tlcmich@hotmail.com at mccordt@sbcglobal.net wrote on 11/15/04 10:15
AM:
>
> > Anyone?
> > I have a simple database in Filemaker Pro 6.0 that has a "start
date" field
> > and an "ending date" field.
> > I need a "number of days" field that gives me the total number of
days
> > between these dates. (including weekends and holidays)
> > Does anyone know a formula to do this?
> > Thanks,
> > Tom
> >
> >
> End Date - Start Date
>

Make sure the result is Number, not Date.


0
Reply Glenn 11/15/2004 6:50:15 PM

When I clicked on the link, it says the article has been removed.
Where else can I get the article?
Tom

"Glenn Schwandt" <schwandtgAT@aolDOT.com> wrote in message
news:2vsc39F2n7550U1@uni-berlin.de...
> "Lee Smith" <canepa6645@charter.net> wrote in message
> news:BDBE390E.C801%canepa6645@charter.net...
> > in article Km6md.20683$Rf1.13858@newssvr19.news.prodigy.com,
> > tlcmich@hotmail.com at mccordt@sbcglobal.net wrote on 11/15/04 10:15
> AM:
> >
> > > Anyone?
> > > I have a simple database in Filemaker Pro 6.0 that has a "start
> date" field
> > > and an "ending date" field.
> > > I need a "number of days" field that gives me the total number of
> days
> > > between these dates. (including weekends and holidays)
> > > Does anyone know a formula to do this?
> > > Thanks,
> > > Tom
> > >
> > >
> > End Date - Start Date
> >
>
> Make sure the result is Number, not Date.
>
>


0
Reply Tom 11/15/2004 7:19:06 PM

in article Ki7md.20712$Rf1.11039@newssvr19.news.prodigy.com, Tom at
mccordt@sbcglobal.net wrote on 11/15/04 11:19 AM:

> When I clicked on the link, it says the article has been removed.
> Where else can I get the article?
> Tom
> 
> "Glenn Schwandt" <schwandtgAT@aolDOT.com> wrote in message
> news:2vsc39F2n7550U1@uni-berlin.de...
>> "Lee Smith" <canepa6645@charter.net> wrote in message
>> news:BDBE390E.C801%canepa6645@charter.net...
>>> in article Km6md.20683$Rf1.13858@newssvr19.news.prodigy.com,
>>> tlcmich@hotmail.com at mccordt@sbcglobal.net wrote on 11/15/04 10:15
>> AM:
>>> 
>>>> Anyone?
>>>> I have a simple database in Filemaker Pro 6.0 that has a "start
>> date" field
>>>> and an "ending date" field.
>>>> I need a "number of days" field that gives me the total number of
>> days
>>>> between these dates. (including weekends and holidays)
>>>> Does anyone know a formula to do this?
>>>> Thanks,
>>>> Tom
>>>> 
>>>> 
>>> End Date - Start Date
>>> 
>> 
>> Make sure the result is Number, not Date.
>> 
>> 
> 
> 
What article are you referring to?

There has been no reference to any articles in this thread that I saw. You
asked for the formula for finding the number of days, which I gave as End
Date - Start Date, and to which Glenn Schwandt added that your calculation
results needs to be a number and not a date.

Lee

0
Reply Lee 11/15/2004 7:32:47 PM

In article <Ki7md.20712$Rf1.11039@newssvr19.news.prodigy.com>, "Tom"
<mccordt@sbcglobal.net> wrote:
> "Glenn Schwandt" <schwandtgAT@aolDOT.com> wrote in message
> news:2vsc39F2n7550U1@uni-berlin.de...
> > "Lee Smith" <canepa6645@charter.net> wrote in message
> > news:BDBE390E.C801%canepa6645@charter.net...
> > > in article Km6md.20683$Rf1.13858@newssvr19.news.prodigy.com,
> > > tlcmich@hotmail.com at mccordt@sbcglobal.net wrote on 11/15/04 10:15
> > AM:
> > >
> > > > Anyone?
> > > > I have a simple database in Filemaker Pro 6.0 that has a "start
> > > > date" field and an "ending date" field.
> > > > I need a "number of days" field that gives me the total number of
> > > > days between these dates. (including weekends and holidays)
> > > > Does anyone know a formula to do this?
> > > > Thanks,
> > > > Tom
> > > 
> > > End Date - Start Date
> >
> > Make sure the result is Number, not Date.
> 
> When I clicked on the link, it says the article has been removed.
> Where else can I get the article?
> Tom

Errr ... what article?? The links above that say "In article XYZ" don't
usually work since they point to the newsserver of the person who wrote
the reply and you don't have access to their newsserver.


Anyway, FileMaker's dates work in Days. So as Lee said, simply
subtracting the start date from the end date will give you the number
of days IN BETWEEN.

eg.    NumDays  {Calculation, number result}
          = EndDate - StartDate 

As long as StartDate and EndDate are date fields.

You may need to add one or two days if you need to include the starting
day and / or ending day. 


Similarly you can simply add or subtract days to a date field to work
out the date "next week", "last week", etc.

eg.    NextWeek = TodaysDate + 7
 
       LastWeek = TodaysDate - 7


It's when you want to skip weekends and especially holidays that things
get messy.


Helpful Harry                   
Hopefully helping harassed humans happily handle handiwork hardships  ;o)
0
Reply Helpful 11/15/2004 8:16:59 PM

OK, it worked. Thanks a lot.
Now, the Total Days field shows a number like this:     -14327      when
there is a Start Date but no End Date.
How can I get the negative number to go away until the End Date is ready to
be typed in?
Tom


"Helpful Harry" <helpful_harry@nom.de.plume.com> wrote in message
news:161120040916594535%helpful_harry@nom.de.plume.com...
> In article <Ki7md.20712$Rf1.11039@newssvr19.news.prodigy.com>, "Tom"
> <mccordt@sbcglobal.net> wrote:
> > "Glenn Schwandt" <schwandtgAT@aolDOT.com> wrote in message
> > news:2vsc39F2n7550U1@uni-berlin.de...
> > > "Lee Smith" <canepa6645@charter.net> wrote in message
> > > news:BDBE390E.C801%canepa6645@charter.net...
> > > > in article Km6md.20683$Rf1.13858@newssvr19.news.prodigy.com,
> > > > tlcmich@hotmail.com at mccordt@sbcglobal.net wrote on 11/15/04 10:15
> > > AM:
> > > >
> > > > > Anyone?
> > > > > I have a simple database in Filemaker Pro 6.0 that has a "start
> > > > > date" field and an "ending date" field.
> > > > > I need a "number of days" field that gives me the total number of
> > > > > days between these dates. (including weekends and holidays)
> > > > > Does anyone know a formula to do this?
> > > > > Thanks,
> > > > > Tom
> > > >
> > > > End Date - Start Date
> > >
> > > Make sure the result is Number, not Date.
> >
> > When I clicked on the link, it says the article has been removed.
> > Where else can I get the article?
> > Tom
>
> Errr ... what article?? The links above that say "In article XYZ" don't
> usually work since they point to the newsserver of the person who wrote
> the reply and you don't have access to their newsserver.
>
>
> Anyway, FileMaker's dates work in Days. So as Lee said, simply
> subtracting the start date from the end date will give you the number
> of days IN BETWEEN.
>
> eg.    NumDays  {Calculation, number result}
>           = EndDate - StartDate
>
> As long as StartDate and EndDate are date fields.
>
> You may need to add one or two days if you need to include the starting
> day and / or ending day.
>
>
> Similarly you can simply add or subtract days to a date field to work
> out the date "next week", "last week", etc.
>
> eg.    NextWeek = TodaysDate + 7
>
>        LastWeek = TodaysDate - 7
>
>
> It's when you want to skip weekends and especially holidays that things
> get messy.
>
>
> Helpful Harry
> Hopefully helping harassed humans happily handle handiwork hardships  ;o)


0
Reply Tom 11/15/2004 9:11:30 PM

if ( isempty(enddate); "";  insert.your.days.calculation.formula.here )

This will return an empty field until your enddate is filled in.
Regards, Wolf

"Tom" <mccordt@sbcglobal.net> schrieb im Newsbeitrag
news:6Y8md.18802$VB4.1497@newssvr15.news.prodigy.com...
> OK, it worked. Thanks a lot.
> Now, the Total Days field shows a number like this:     -14327      when
> there is a Start Date but no End Date.
> How can I get the negative number to go away until the End Date is ready
to
> be typed in?
> Tom
>
>
> "Helpful Harry" <helpful_harry@nom.de.plume.com> wrote in message
> news:161120040916594535%helpful_harry@nom.de.plume.com...
> > In article <Ki7md.20712$Rf1.11039@newssvr19.news.prodigy.com>, "Tom"
> > <mccordt@sbcglobal.net> wrote:
> > > "Glenn Schwandt" <schwandtgAT@aolDOT.com> wrote in message
> > > news:2vsc39F2n7550U1@uni-berlin.de...
> > > > "Lee Smith" <canepa6645@charter.net> wrote in message
> > > > news:BDBE390E.C801%canepa6645@charter.net...
> > > > > in article Km6md.20683$Rf1.13858@newssvr19.news.prodigy.com,
> > > > > tlcmich@hotmail.com at mccordt@sbcglobal.net wrote on 11/15/04
10:15
> > > > AM:
> > > > >
> > > > > > Anyone?
> > > > > > I have a simple database in Filemaker Pro 6.0 that has a "start
> > > > > > date" field and an "ending date" field.
> > > > > > I need a "number of days" field that gives me the total number
of
> > > > > > days between these dates. (including weekends and holidays)
> > > > > > Does anyone know a formula to do this?
> > > > > > Thanks,
> > > > > > Tom
> > > > >
> > > > > End Date - Start Date
> > > >
> > > > Make sure the result is Number, not Date.
> > >
> > > When I clicked on the link, it says the article has been removed.
> > > Where else can I get the article?
> > > Tom
> >
> > Errr ... what article?? The links above that say "In article XYZ" don't
> > usually work since they point to the newsserver of the person who wrote
> > the reply and you don't have access to their newsserver.
> >
> >
> > Anyway, FileMaker's dates work in Days. So as Lee said, simply
> > subtracting the start date from the end date will give you the number
> > of days IN BETWEEN.
> >
> > eg.    NumDays  {Calculation, number result}
> >           = EndDate - StartDate
> >
> > As long as StartDate and EndDate are date fields.
> >
> > You may need to add one or two days if you need to include the starting
> > day and / or ending day.
> >
> >
> > Similarly you can simply add or subtract days to a date field to work
> > out the date "next week", "last week", etc.
> >
> > eg.    NextWeek = TodaysDate + 7
> >
> >        LastWeek = TodaysDate - 7
> >
> >
> > It's when you want to skip weekends and especially holidays that things
> > get messy.
> >
> >
> > Helpful Harry
> > Hopefully helping harassed humans happily handle handiwork hardships
;o)
>
>


0
Reply Wolf 11/15/2004 11:59:31 PM

In article <6Y8md.18802$VB4.1497@newssvr15.news.prodigy.com>, "Tom"
<mccordt@sbcglobal.net> wrote:

> OK, it worked. Thanks a lot.
> Now, the Total Days field shows a number like this:     -14327      when
> there is a Start Date but no End Date.
> How can I get the negative number to go away until the End Date is ready to
> be typed in?
> Tom

There's various ways to achieve that, but probably the easiest is to
simply use an If statement.
ie.

    NumDays {Calculation, number result}
      = If (IsEmpty(StartDate) or IsEmpty(EndDate), 
            "", 
            EndDate - StartDate)

That way if either date field is empty the number of days field will
stay empty too.


Helpful Harry                   
Hopefully helping harassed humans happily handle handiwork hardships  ;o)
0
Reply Helpful 11/16/2004 12:07:12 AM

Thanks Harry,
You are a life saver. Your formula worked perfectly. Your instructions are
clear and accurate. Could you suggest a book for me to learn about "IsEmpty"
and all the other formula terms?
Tom

"Helpful Harry" <helpful_harry@nom.de.plume.com> wrote in message
news:161120041307125008%helpful_harry@nom.de.plume.com...
> In article <6Y8md.18802$VB4.1497@newssvr15.news.prodigy.com>, "Tom"
> <mccordt@sbcglobal.net> wrote:
>
> > OK, it worked. Thanks a lot.
> > Now, the Total Days field shows a number like this:     -14327      when
> > there is a Start Date but no End Date.
> > How can I get the negative number to go away until the End Date is ready
to
> > be typed in?
> > Tom
>
> There's various ways to achieve that, but probably the easiest is to
> simply use an If statement.
> ie.
>
>     NumDays {Calculation, number result}
>       = If (IsEmpty(StartDate) or IsEmpty(EndDate),
>             "",
>             EndDate - StartDate)
>
> That way if either date field is empty the number of days field will
> stay empty too.
>
>
> Helpful Harry
> Hopefully helping harassed humans happily handle handiwork hardships  ;o)


0
Reply Tom 11/16/2004 1:08:37 PM

I find the help that filemaker provides within its program quiet helpfull
and easy to understand, especially if you look directly for a explanation on
a scriptstep or formula terms.

"Tom" <mccordt@sbcglobal.net> schreef in bericht
news:pZmmd.18868$vw6.513@newssvr15.news.prodigy.com...
> Thanks Harry,
> You are a life saver. Your formula worked perfectly. Your instructions are
> clear and accurate. Could you suggest a book for me to learn about
"IsEmpty"
> and all the other formula terms?
> Tom
>
> "Helpful Harry" <helpful_harry@nom.de.plume.com> wrote in message
> news:161120041307125008%helpful_harry@nom.de.plume.com...
> > In article <6Y8md.18802$VB4.1497@newssvr15.news.prodigy.com>, "Tom"
> > <mccordt@sbcglobal.net> wrote:
> >
> > > OK, it worked. Thanks a lot.
> > > Now, the Total Days field shows a number like this:     -14327
when
> > > there is a Start Date but no End Date.
> > > How can I get the negative number to go away until the End Date is
ready
> to
> > > be typed in?
> > > Tom
> >
> > There's various ways to achieve that, but probably the easiest is to
> > simply use an If statement.
> > ie.
> >
> >     NumDays {Calculation, number result}
> >       = If (IsEmpty(StartDate) or IsEmpty(EndDate),
> >             "",
> >             EndDate - StartDate)
> >
> > That way if either date field is empty the number of days field will
> > stay empty too.
> >
> >
> > Helpful Harry
> > Hopefully helping harassed humans happily handle handiwork hardships
;o)
>
>


0
Reply Lars 11/16/2004 4:34:16 PM

10 Replies
723 Views

(page loaded in 0.469 seconds)

Similiar Articles:













7/25/2012 9:55:24 AM


Reply: