Sort By Date String in View

Hi, I need your help.i have a view column with the following formula code:

FechaTracking:=@Middle(@Text(TrackingDateTime);6;4)+@Middle(@Text(TrackingDateTime);3;2)+@Middle(@Text(TrackingDateTime);0;2)+@Middle(@Text(TrackingDateTime);11;2)+@Middle(@Text(TrackingDateTime);14;2);

FechaTask:=@Middle(@Text(TaskStartDate);6;4)+@Middle(@Text(TaskStartDate);3;2)+@Middle(@Text(TaskStartDate);0;2);

@If(FORM=“Activities”;" "+"Act: "

+ActivityOwner;FORM=“Task”;@Text(FechaTask)+"Task: "+TaskName

+" ";@Text(FechaTask)+"Task: “+TaskName+” “+FechaTracking+” "+Tracking)

My problem is:

When Form Is Task:

FechaTask Displays : 20050806

When Form is Traking

FechaTask Displays: 20050608

I create a Local Copy and i have not problem with Sort.

What’s the Problem?

Thanks in advance, sorry for my bad english.

Subject: Sort By Date String in View

I suspect that your problem is related to international date settings – your PC is using one format and the server is using another (date formats are set at the OS level). You might get away with something as simple as @Text( TrackingDateTime; “D0” ). I’m inclined to favor Stan’s suggestion of leaving the column as a date – that way you know it will sort correctly. If necessary, use his suggestions of @Year, @Month, @Day.

Subject: Sort By Date String in View

Whay all of that @Middle stuff? If you want yyyymmdd, the use @Year, @Month and @Day. (Or leave only the date in the column as a date and use the column date display properties to set the display format.)

Subject: RE: Sort By Date String in View

I Tried with @year,@month,@date, but i get an error:Incorrect Data Type Date/Time expected.

I tried with @Text(@Year(TaskStartdate)), but i get the same error.