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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Challenge for the experts

Status
Not open for further replies.

darahw

Technical User
Feb 27, 2003
74
US
Please help:

I have a report that I am grouping based on a parameter value. The parameter value can either be a date or clients name. The problem is that I can't create a formula that will either be a date or text based on a parameter value. And if I convert the date to text obviously I doesn't sort the date correctly.

Does anyone know a way around this?
 
Convert the date to a string format of YYYYMMDD, it will sort correctly.

totext({table.datefield},"yyyyMMdd")

-k
 
Hello,

When you convert the date to string convert it to be in the format of CCYYMMDD so January 5, 2003 would be 20030105 be sure to have the month and day to be two digits (padded with 0s where appropriate). Doing this will result in the dates being correctly sorted.

Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top