Tag Archives: date formatting

How to Format Report Dates

report display format dialogA common questions asked by CyberMatrix customers is how to change the format of dates on reports. There are two ways to format report dates: using a format function and by changing the display format. With either method you must first edit the report from the reporting screen. To edit a CyberMatrix report click on the report on the report list and choose the Edit Report button or choose Custom Reports | Edit Report from the report screen menu.

Format Functions

All CyberMatrix software have report date formatting functions. The advantage to formatting functions is that they use the system formats instead of hardcoding a fixed format.

To add a date formatting function to a report date field simply double click the field to open the field edit screen. Usually the field value will look something like [frxDBDataset1.”WorkDate”]. This is just a bare data field. To add the date formatting function to this field the field is wrapped inside <> characters and this text is wrapped within the FormatDate() function call. So the resulting text will be [FormatDate(<frxDBDataset1.”WorkDate”>)].

Changing Display Formats

To change the display format for a date field right click the field and choose Display Format from the pop-up menu. In the Display Format dialog click on the Date/Time category. In the Format String box enter the display format you want to use with the report. For example, for the ISO date format use yyyy-mm-dd. For US date format you can use mm/dd/yyyy.

After changing the report make sure to save it. Also note that reports are overwritten every time you upgrade the software. So if you want your changes permanent you should save the report with a new name.