Sort - Month then day without year

  • Follow


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

Daniel R. Sloan


0
Reply Daniel 7/24/2003 5:42:39 AM


"Daniel R. Sloan" wrote:
> 
> 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
0
Reply Tim 7/24/2003 5:48:07 AM


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

> 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)
0
Reply Matthew 7/24/2003 9:01:18 AM

[posted and mailed]

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

> 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.

0
Reply Brent 8/6/2003 3:56:43 PM

3 Replies
523 Views

(page loaded in 0.085 seconds)

Similiar Articles:













7/23/2012 9:44:17 PM


Reply: