Skip to main content

How to change the date format on a Crystal Report

When creating a report, in the table SALES_ORDER_FORECAST the week commencing date is in a number format. How do I convert this to dd/mm/yyyy in Crystal?

T
Written by Tyler Martin
Updated over 2 weeks ago

The date in the FactoryMaster database tables is seen as integer (ex: 734,910).
In order to change this format, please follow the below steps:

  1. In the Field Explorer box, right click on the SQL Expression Fields option

  2. Select the New… option

  3. Name the new expression, for example, "Planned Date".

  4. Press OK to continue.

  5. Ensure the new expression is selected on the left of the window.

  6. In the blank space provided beneath the field sections

  7. Put in the relevant fields: dbo.GetFMDate("<Table Name"."<Field Name>") - Example: dbo.GetFMDate ("QTKEYS"."Date_Planned")

This will result in the changing of the date format to this: 11/02/2017 00:00:00
This can then be formatted as required

Did this answer your question?