dbTalk Databases Forums  

trouble with a date field

comp.databases.filemaker comp.databases.filemaker


Discuss trouble with a date field in the comp.databases.filemaker forum.



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

Default trouble with a date field - 03-11-2011 , 06:04 PM






I have a field called DOB and it is a date field. Everyone's date of birth
is in the field. I created an AGE field and used this calculation:
(Get ( CurrentDate )-DOB)/365.24
and set it to display a Number.

When I created this a few months ago, it was working fine. But the Ages do
not seem to be updating correctly. I spot checked and some of them are
definitely off by several months.

Is there something wrong with my formula?

The file is on a FMP Windows server and is being used with Windows FMP 11 by
about six staff members.

Any help would be appreciated.

Reply With Quote
  #2  
Old   
David Jondreau
 
Posts: n/a

Default Re: trouble with a date field - 03-11-2011 , 10:31 PM






On Mar 11, 5:04*pm, "Stephen Larivee" <larive... (AT) yahoo (DOT) com> wrote:
Quote:
I have a field called DOB and it is a date field. *Everyone's date of birth
is in the field. *I created an AGE field and used this calculation:
(Get ( CurrentDate )-DOB)/365.24
and set it to display a Number.

When I created this a few months ago, it was working fine. *But the Ages do
not seem to be updating correctly. *I spot checked and some of them are
definitely off by several months.

Is there something wrong with my formula?

The file is on a FMP Windows server and is being used with Windows FMP 11by
about six staff members.

Any help would be appreciated.
There are two issues.

One is the field storage options must be set to "Do not store...".
Your field won't update without that and Filemaker will always think
Get(CurrentDate) is the date you created the field or the record.

The other is your age calculation will not always be accurate. It'll
be off by a day or few for a subset of ages. Calculating age is
surprisingly annoying. This function seems like an elegant solution,
but I have tested it: http://www.briandunning.com/cf/79.

DJ

Reply With Quote
  #3  
Old   
Stephen Larivee
 
Posts: n/a

Default Re: trouble with a date field - 03-12-2011 , 09:58 AM



"David Jondreau" <david (AT) wingforward (DOT) net> wrote

Quote:
On Mar 11, 5:04 pm, "Stephen Larivee" <larive... (AT) yahoo (DOT) com> wrote:
I have a field called DOB and it is a date field. Everyone's date of
birth
is in the field. I created an AGE field and used this calculation:
(Get ( CurrentDate )-DOB)/365.24
and set it to display a Number.

When I created this a few months ago, it was working fine. But the Ages
do
not seem to be updating correctly. I spot checked and some of them are
definitely off by several months.

Is there something wrong with my formula?

The file is on a FMP Windows server and is being used with Windows FMP 11
by
about six staff members.

Any help would be appreciated.

There are two issues.

One is the field storage options must be set to "Do not store...".
Your field won't update without that and Filemaker will always think
Get(CurrentDate) is the date you created the field or the record.

The other is your age calculation will not always be accurate. It'll
be off by a day or few for a subset of ages. Calculating age is
surprisingly annoying. This function seems like an elegant solution,
but I have tested it: http://www.briandunning.com/cf/79.

DJ

You were right. When I changed the storage, everything cleared up. Thank
you. I will check out your link later.

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 - 2013, Jelsoft Enterprises Ltd.