Skip to Content
author's profile photo Former Member
Former Member

Date Sorting In crystal

Hi Experts here is the issue i am facing kindly solve this.

i have a field called transaction Date.

When i apply sorting for this data like this.









But i need sort the date like this






Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Dec 17, 2012 at 01:44 PM

    Hi Francis,

    No matter what Date Format your field is in, sorting should produce the same results.

    You just need to change the format of your date for display purposes. Right-click the Date field > Format Field > change the format of the date.


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 17, 2012 at 01:37 PM

    Hi Francis

    It appears that the date format in your version of Crystal is MM/DD/YYYY and you want it to be sorted in DD/MM/YYYY.

    Got to File->Options->Fields and set the date format as you want, DD/MM/YYYY. This should work.


    Nikhil Sabnis

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Francis

      use the formula below to convert the dates, in string format, to date format:

      numberVar DD:=Tonumber(Mid({?@PrmtFrmDate},1,2));

      numberVar MM:=Tonumber(Mid({?@PrmtFrmDate},4,2));

      numberVar YYYY:=Tonumber(Mid({?@PrmtFrmDate},7,4));


      You need to modify the above formula to specify exactly where your month and day is in the date string. In the above formula replace {?@PrmtFrmDate} with your string field.


      Nikhil Sabnis

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.