How to Convert Numeric Dates to Date Format in Crystal Reports


This is a guide on how to convert numeric date values to a year-month-day format in CrypstalReports. This code is useful when you have date data stored as 8-digit numeric values representing the year, month, and day.

First, create a formula field. Within it, write the following expression. To edit the expression, right-click and select “Edit Formula.”

With this, you can convert the numeric value to a date. Replace {DBColumn} with the name of your database field.

However, this will still display in the format 1986/01/06. To change the date format, you’ll need to set the properties of this formula field.

For DateFirstSeparator, DateSecondSeparator, and DateSuffixSeparator, input “年” (for year), “月” (for month), and “日” (for day), respectively. This will display the date as 1986年01月06日.