dbTalk Databases Forums  

Date calculation

comp.databases.filemaker comp.databases.filemaker


Discuss Date calculation in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
tomislav
 
Posts: n/a

Default Date calculation - 12-02-2006 , 03:59 AM






I am new to datebase program, and new to filemaker. Problem I have is as
follow:
I know date of arrival of certain goods. Warranty on the products is for
example 18 months. If product arrrived on June 6, 2006; today is
December 12, 2006; warranty is 18 months form June 6 2006. I want to
know how much of warranty left from "todays" date. Todays date is
current system date.

Reply With Quote
  #2  
Old   
Christoph Kaufmann
 
Posts: n/a

Default Re: Date calculation - 12-02-2006 , 05:31 AM






tomislav <tomislav (AT) htnet (DOT) hr> wrote:

Quote:
I know date of arrival of certain goods. Warranty on the products is for
example 18 months. If product arrrived on June 6, 2006; today is
December 12, 2006; warranty is 18 months form June 6 2006. I want to
know how much of warranty left from "todays" date. Todays date is
current system date.
Try the date functions.

If you have the fields
Datearrival (date field)
WarrantyMonths (number field)

The field WarrantyEnd_c (calc, date result) will give you the date the
warranty ends. The calc will look like this (hope you don't mind the
German functions):

Datum ( MonatZahl ( DateArrival ) + WarrantyMonths; KalendertagZahl (
DateArrival ) ; Jahreszahl ( DateArrival ) )

The field WarrantyDaysLeft_c (calc, number result) will look like this:

WarrantyEnd_c - Hole ( System Datum )

You don't need the field WarrantyEnd_c for what you want, you can put
the two calcs into one.
--
http://clk.ch


Reply With Quote
  #3  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: Date calculation - 12-02-2006 , 06:15 AM



If I may - while not knowing much of the german language - I may try to put
in FileMaker english the proposed formulas (I didn't test them) :
WarrantyEnd_c = Date ( Month ( DateArrival ) + WarrantyMonths; Day (
DateArrival ) ; Year (DateArrival ) )
WarrantyDaysLeft_c = WarrantyEnd_c - Get ( CurrentDate)
Hoping that I did not make mistakes...
Remi-Noel


"Christoph Kaufmann" <clk (AT) freesurf (DOT) ch> a écrit dans le message de news:
1hppwzv.153gh7ha0x4cgN%clk (AT) freesurf (DOT) ch...
Quote:
tomislav <tomislav (AT) htnet (DOT) hr> wrote:

I know date of arrival of certain goods. Warranty on the products is for
example 18 months. If product arrrived on June 6, 2006; today is
December 12, 2006; warranty is 18 months form June 6 2006. I want to
know how much of warranty left from "todays" date. Todays date is
current system date.

Try the date functions.

If you have the fields
Datearrival (date field)
WarrantyMonths (number field)

The field WarrantyEnd_c (calc, date result) will give you the date the
warranty ends. The calc will look like this (hope you don't mind the
German functions):

Datum ( MonatZahl ( DateArrival ) + WarrantyMonths; KalendertagZahl (
DateArrival ) ; Jahreszahl ( DateArrival ) )

The field WarrantyDaysLeft_c (calc, number result) will look like this:

WarrantyEnd_c - Hole ( System Datum )

You don't need the field WarrantyEnd_c for what you want, you can put
the two calcs into one.
--
http://clk.ch



Reply With Quote
  #4  
Old   
tomislav
 
Posts: n/a

Default Re: Date calculation - 12-02-2006 , 03:39 PM



Remi-Noel Menegaux wrote:
Quote:
If I may - while not knowing much of the german language - I may try to put
in FileMaker english the proposed formulas (I didn't test them) :
WarrantyEnd_c = Date ( Month ( DateArrival ) + WarrantyMonths; Day (
DateArrival ) ; Year (DateArrival ) )
WarrantyDaysLeft_c = WarrantyEnd_c - Get ( CurrentDate)
Hoping that I did not make mistakes...
Remi-Noel


"Christoph Kaufmann" <clk (AT) freesurf (DOT) ch> a écrit dans le message de news:
1hppwzv.153gh7ha0x4cgN%clk (AT) freesurf (DOT) ch...

tomislav <tomislav (AT) htnet (DOT) hr> wrote:


I know date of arrival of certain goods. Warranty on the products is for
example 18 months. If product arrrived on June 6, 2006; today is
December 12, 2006; warranty is 18 months form June 6 2006. I want to
know how much of warranty left from "todays" date. Todays date is
current system date.

Try the date functions.

If you have the fields
Datearrival (date field)
WarrantyMonths (number field)

The field WarrantyEnd_c (calc, date result) will give you the date the
warranty ends. The calc will look like this (hope you don't mind the
German functions):

Datum ( MonatZahl ( DateArrival ) + WarrantyMonths; KalendertagZahl (
DateArrival ) ; Jahreszahl ( DateArrival ) )

The field WarrantyDaysLeft_c (calc, number result) will look like this:

WarrantyEnd_c - Hole ( System Datum )

You don't need the field WarrantyEnd_c for what you want, you can put
the two calcs into one.
--
http://clk.ch



Thank you


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.