I need to evaluate dates and then create a value, and then sort by that value. This is a sample of my formula as there are many dates and the formula is quite long. The problem is that it won't sort correctly because the values it creates are strings:
if DATE ({up_rpt_receipt.RCV_RCV_DATE}) in [Date("12/14/2008") to Date("12/27/2008")]then "1" else
if DATE ({up_rpt_receipt.RCV_RCV_DATE}) in [Date("12/28/2008") to Date("1/10/2009")]then "2" else
if DATE ({up_rpt_receipt.RCV_RCV_DATE}) in [Date("1/11/2009") to Date("1/24/2009")]then "10" else
When I try to sort it gives me:
1
10
2
I need:
1
2
10
How can I modify the formula so that the results can be sorted numerically?
if DATE ({up_rpt_receipt.RCV_RCV_DATE}) in [Date("12/14/2008") to Date("12/27/2008")]then "1" else
if DATE ({up_rpt_receipt.RCV_RCV_DATE}) in [Date("12/28/2008") to Date("1/10/2009")]then "2" else
if DATE ({up_rpt_receipt.RCV_RCV_DATE}) in [Date("1/11/2009") to Date("1/24/2009")]then "10" else
When I try to sort it gives me:
1
10
2
I need:
1
2
10
How can I modify the formula so that the results can be sorted numerically?