Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to sort date field (yyyy, mm, dd) by mm, then dd -- can't figure 1

Status
Not open for further replies.

BetteBoop

Programmer
Jan 2, 2001
3
US
Have Crystal 6.1.4, using SQL server. Creating report to display birthdate, but not include year. Need to sort by mm, then dd. In db, Birthdate field defined as Date (yyyy, mm, dd).

Thanks for your help.
 
Create the following formula and sort on it:

Month({birthdate}) * 100 +
Day ({birthdate})


This will turn 12/01/76 into the number 1201, which will sort as you described.


Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top