Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Birthday in a given period of time

Featured Replies

  • Newbies

hello, hope somebody could help...

i have a db with insurance clients whom i would like to congratulate on their birthdays;

my task is to write a script which would give me a list of birthdays

in a given period of time, e.g. this week, next month, etc...

script which i "wrote":

Enter Find Mode

Set Field (Clients :: month; Month(Get(CurrentDate)))

Perform Find

allows me to list persons in a current month only;

apart from that, the list shows mixed dates, is not chronological with respect to days frown.png

any attempts to modify the script with "day" were futile; so obviously i still got to learn a lot...

thanks in advance,

fmfox

You really don't need a script. Just do a Find.

3/*/* finds all dob = March

then sort, dob ascending, if you want. Not sure why you need it sorted...for a printout?

Set Field (Clients :: month; Month(Get(CurrentDate)))

You have a field for the client's month of birth??

the list shows mixed dates, is not chronological with respect to days

If you want to sort them by their order of appearance in the calendar, try defining a calculation field (result is Number) =

Month ( DateOfBirth ) + Day ( DateOfBirth ) / 100

and sort by this field. This assumes you are not finding for a period that spans across a year boundary.

Automatic message

This topic has been moved from "FileMaker Product FamilyFileMaker Pro 11" to "Database Schema & Business LogicCalculation Engine (Define Fields)".

The General topic areas are intended for the discussion of the functions, features and tools that were new with the particular version mentioned.

All how-to question should be posted to a topic area that best matches the sprit of the problem. Many questions can fit into more then one area, but you only need to pick one, and go with it.

If you have any questions about this action, please contact me through a private message.

Lee

  • Author
  • Newbies

You really don't need a script. Just do a Find. 3/*/* finds all dob = March then sort, dob ascending, if you want. Not sure why you need it sorted...for a printout?

yes for printout...

thanks for the tip, will give it a try...

You have a field for the client's month of birth??

no...a field defined as date in format of dd/mm/yyyy

If you want to sort them by their order of appearance in the calendar, try defining a calculation field (result is Number) = Month ( DateOfBirth ) + Day ( DateOfBirth ) / 100 and sort by this field. This assumes you are not finding for a period that spans across a year boundary.

that's a precious tip...thanks; will test yours and the one of bcooney...

  • Author
  • Newbies

yes for printout...

thanks for the tip, will give it a try...

that's a precious tip...thanks; will test yours and the one of bcooney...

well, your "find" does find all birthdays of a given month, but ascending sorting sorts by year, but i need by day of the month...

any further thoghts? thanks...

I'm confused by your setup. Do you have a DateOfBirth field that is a date field?

  • 2 weeks later...
  • Author
  • Newbies

I'm confused by your setup. Do you have a DateOfBirth field that is a date field?

yes i do; and although your Find (3/*/* finds all dob = March) gave me correct result, the Sort was still achronological;

so, as comment suggested i solved the problem with an extra calculation field DOB (Month ( DateOfBirth ) + Day ( DateOfBirth ) / 100)

and Sort became chronological...thanks...

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.