dbTalk Databases Forums  

Re: Search Birthday Date in 30 days future without year

comp.databases.filemaker comp.databases.filemaker


Discuss Re: Search Birthday Date in 30 days future without year in the comp.databases.filemaker forum.



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

Default Re: Search Birthday Date in 30 days future without year - 07-23-2003 , 10:51 PM






If you were to think in English (I'm assuming that English is your
primary language) about what you really want, isn't it that you want to
know when their next borthday is. Or more to the point, whose next
birthday is in the next 30 days.

So what is the next birthday? If the data has already passed this year,
then the date will be next year. Otherwise, the date will be sometime
between now and the end of the year.

To translate the english into FileMaker, create a calculation field that is:

if(
date(month(Birthday), day(birthday), year(status(currentdate))) <
status(currentdate),
date(month(Birthday), day(birthday), year(status(currentdate))+1),
date(month(Birthday), day(birthday), year(status(currentdate))
)

Now use your script with the (-30) and everything to find what you want
based on this new calculation.



Daniel R. Sloan wrote:
Quote:
How can I change this date without year? for sample search in 30 days
7/23/xxxx as today between 8/23/xxxx in Birthday date field

--------------------------------------------Field Name

ExpiredDate Date Indexed
gDaysFuture Globe Number
ExpiredDate_c Calculation Indexed, = ExpiredDate (X) Do not
evaluate if all referenced fields are empty Index = On

--------------------------------------------Script - "Days in the Future"

Set Error Capture (On)
Enter Find Mode ()
Set Field ("ExpiredDate_c",Status(CurrentDate) & "..." &
(Status(CurrentDate) + gDaysFuture)")
Perform Find ()
If ("Status(CurrentFoundCount) >= 1")
Go to Layout ('List View")
Else
Show Message ("No Records Found")
Find All
End If
-------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California
Associate Member, FileMaker Solutions Alliance



Reply With Quote
  #2  
Old   
Daniel R. Sloan
 
Posts: n/a

Default Re: Search Birthday Date in 30 days future without year - 07-23-2003 , 11:48 PM






Success, how about Sort - Month / Day without year?

Daniel R. Sloan



Reply With Quote
  #3  
Old   
Lee Smith
 
Posts: n/a

Default Re: Search Birthday Date in 30 days future without year - 07-24-2003 , 09:30 AM



In reply to byJTa.131370$N7.19332@sccrnsc03 on 7/23/03 9:48 PM by Daniel R.
Sloan danielsloan (AT) comcast (DOT) net:

Quote:
Success, how about Sort - Month / Day without year?

Daniel R. Sloan


Hi Daniel,

FileMaker has a lot of built in date features.

Here is another approach that may be of use:

Field Name Field Type Formula / Entry Option
Birthday Date
NextbirthdayMonth Calculation (Number) = Month(Birthday)
NextbirthdayDay Calculation (Number) = Day(Birthday)
NextbirthdayMonthWarning Calculation (Number) = Month(Birthday - 30)

And you can sort by the month and day calculations

HTH

Lee



Reply With Quote
  #4  
Old   
Brent Simon
 
Posts: n/a

Default Re: Search Birthday Date in 30 days future without year - 08-15-2003 , 10:41 AM



[posted and mailed]

I know this may be a little late but . .

I found the easiest way is to sort by month and date sans the year is to
use the following calculated field -

zc.SortDate(text): If( Month( Date ) < 10 , "0" ,"" ) & Month( Date ) &
"." & If( Day( Date ) < 10 , "0" ,"" ) & Day( Date )

you end up with a calculated result like 03.12 for a date of 3/12/2001 and
it should sort just fine.




"Daniel R. Sloan" <danielsloan (AT) comcast (DOT) net> wrote in news:byJTa.131370
$N7.19332@sccrnsc03:

Quote:
Success, how about Sort - Month / Day without year?

Daniel R. Sloan




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.