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

Re: Date sort

Status
Not open for further replies.

ecsrs

Technical User
Apr 22, 2002
35
US
I have the following formula called "assessdate":

If {tr_assev.avent_desc} = "" then
""
else ToText({ta_assm_int.assm_assess_date})

The formula makes me convert the date to a string, however I want to keep it a date so that I can sort by it in my report. As it is now I can sort by this formula field but it doesn't sort it as date, it sorts it as a string.
For example:
09/23/2003
10/01/1999
11/25/2001
12/01/2000

Please help!!

 
Use your formula for displaying, and this for sorting:

If {tr_assev.avent_desc} = "" then
cdate(1900,1,1)
else
{ta_assm_int.assm_assess_date}

Providing 1900 is guaranteed to be a date prior to anything in the database.

Or if you want them to display last, then make it cdate(2200,1,1)

To eliminate them from the report completely use Report->Edit record Selection->Formula:

{tr_assev.avent_desc} <> &quot;&quot;

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top