dbTalk Databases Forums  

Sort by month

comp.databases.filemaker comp.databases.filemaker


Discuss Sort by month in the comp.databases.filemaker forum.



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

Default Sort by month - 02-14-2007 , 03:58 PM






I'd like to sort a Date of Birth field by the 'month' in order to sort
birthdays into their months. TIA.


Reply With Quote
  #2  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Sort by month - 02-14-2007 , 05:27 PM






In article <1171490291.756077.103250 (AT) l53g2000cwa (DOT) googlegroups.com>,
"yarravillebrad" <yarravillebrad (AT) yahoo (DOT) com.au> wrote:

Quote:
I'd like to sort a Date of Birth field by the 'month' in order to sort
birthdays into their months. TIA.
Create a new Calculation field that extracts the month
eg.
BirthMonth Calculation, Number Result, Unstored
= Month(DateofBirth)

and then sort by this new field instead. This function gives you the
number of the month (eg. 1 for January, 7 for July, etc.) which makes
it perfect for sorting in calendar order (rather than the MonthName
function which will sort in alphabetical order).



Depending on what you're trying to do, you may also want the day.
ie.
BirthDay Calculation, Number Result, Unstored
= Day(DateofBirth)

and then sort in this order:

BirthMonth Increasing
BirthDay Increasing

to get the records in the correct calendar order.

Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


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.