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!

How do I get a Date Key to sort by Day of Month?

Status
Not open for further replies.

TinLegs

Programmer
Jan 14, 2003
100
NZ
I have a Report sorted by a 'Date of Birth' Key (date field). Fine for sorting mm/dd/yy but not for 'dd' only.

For example the user selects a given Month then the report lists:

Name of person Day of month born

I would like the 'Day of month born' sorted 1 to 31.

Program is C6.1 - Legacy

Any idea's,
Thanks
 
Hi!

You cannot use the Date Key as the date is just a number.

The best approach would be to read the data into a Queue and print the queue. C6.x supports printing from Queues as well.

Another approach would be to define another column called BDayMMDD as a STRING(5) and populate it as BDayMMDD = format(BirthDay,@d01). The a Range limit of BDayMMDD > '02' and BDayMMDD < '03' gets the Feb Birthday list.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top