dbTalk Databases Forums  

Sort - Month then day without year

comp.databases.filemaker comp.databases.filemaker


Discuss Sort - Month then day without year in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Daniel R. Sloan
 
Posts: n/a

Default Sort - Month then day without year - 07-24-2003 , 12:42 AM






How's about "Sort" Month / Day without year in birthday date field?

Daniel R. Sloan



Reply With Quote
  #2  
Old   
Tim Booth
 
Posts: n/a

Default Re: Sort - Month then day without year - 07-24-2003 , 12:48 AM








"Daniel R. Sloan" wrote:
Quote:
How's about "Sort" Month / Day without year in birthday date field?
Two calcs based on the full date field of format xx/xx/xxxx

Day: Left (DateField, 2)
Month: Middle (DateField, 4, 2)

Then sort on those in order

Cheers

Webko


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

Default Re: Sort - Month then day without year - 07-24-2003 , 04:01 AM



In article <jlKTa.131701$N7.19170@sccrnsc03>,
"Daniel R. Sloan" <danielsloan (AT) comcast (DOT) net> wrote:

Quote:
How's about "Sort" Month / Day without year in birthday date field?
If the field is actually a date type then you could have a calculated
field of:

(month(bdate) * 100) + day(dbate)

This will give you numbers like:

131 - for Jan 31
1202 - for Dec 2

You can then sort on this calculated field.

--
Matthew Smith
(to reply via email remove xxx)


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

Default Re: Sort - Month then day without year - 08-06-2003 , 10:56 AM



[posted and mailed]

"Daniel R. Sloan" <danielsloan (AT) comcast (DOT) net> wrote in news:jlKTa.131701
$N7.19170@sccrnsc03:

Quote:
How's about "Sort" Month / Day without year in birthday date field?

Daniel R. Sloan





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.



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.