@sort and dates

Hi alli have problems with @sort function when I try to sort dates.

If user has format of date dd/mm/yyyy

then sorting looks like

10/10/2008

15//12/2008

20/5/2008

and it is not user friendly.

could you please hel me with the formula? here is my version

hodnoty:=@DbLookup(“”:“NoCache”;“”:“”;“DPT profile by name”;DPT_name;6;[FailSilent]);

aaa:=@Sort(hodnoty;[CustomSort]; @If(@Date($A)<@Date($B);-1; @Date($A)>@Date($B);1;0));

values:=@Unique(@Text(aaa));

datum:=@Prompt([OkCancelList]; “Select a Date”; "Please select a date for the enrollment "; “”; values);

of course in the end I convert dates to date format, everythings works ok, jus sorting is problem…thanks for advices

Subject: @sort and dates

What happens wheny you change the @prompt to include the [NoSort] parameter?

If your view “DPT profile by Name” is sorted by date… Then I think you only need:

hodnoty:=@DbLookup(“”:“NoCache”;“”:“”;“DPT profile by name”;DPT_name;6;[FailSilent]);

datum:=@Prompt([OkCancelList]:[NoSort]; “Select a Date”; "Please select a date for the enrollment "; “”; valu

Subject: RE: @sort and dates

Thank you.Now it works properly.