Report RDLC Time Format in Business Central (24-Hour or 12 Hour with AM/PM)
In many reporting scenarios, users need to display time in a specific format — including hours, minutes, and seconds, such as 15.00.00 PM.
By default, Business Central shows DateTime values in system-defined formats (e.g., 15:00:00), but using a few simple formatting tricks in RDLC, you can easily display the time in 24-hour clock format with dots instead of colons — and even add the AM/PM suffix.
In this blog, we’ll walk through how to create a Vendor Time Format Demo Report in Business Central (Report ID 50110) and show the time as 15.00.00 PM in the RDLC layout.
Below is a simple AL report that fetches Vendor data, including the Last Modified Date Time field.
report 50110 "MyReport"
{
UsageCategory = ReportsAndAnalysis;
ApplicationArea = All;
DefaultRenderingLayout = LayoutName;
Caption = 'Vendor Time Format Demo Report';
dataset
{
dataitem(Vendor; Vendor)
{
column(VendorNo; "No.") { }
column(VendorLastModifiedDateTime; "Last Modified Date Time") { }
}
}
rendering
{
layout(LayoutName)
{
Type = RDLC;
LayoutFile = 'VendorTimeFormatDemo.rdl';
}
}
}
Add a textbox where you want to display the formatted time.
Right-click the textbox → Expression...
Explanation
-
HH→ Hour in 24-hour format -
mm→ Minutes -
ss→ Seconds -
tt→ Displays AM/PM
15:00:00 PM into 15.00.00 PM.=Replace(Format(Fields!VendorLastModifiedDateTime.Value, "HH:mm:ss tt"), ":", ".")
Explanation
-
HH→ Hour in 24-hour format -
mm→ Minutes -
ss→ Seconds -
tt→ Displays AM/PM -
Replace(..., ":", ".")→ Replaces colons with dots
This converts 15:00:00 PM into 15.00.00 PM.
With just a few lines of AL and a simple RDLC expression, you can control how time is displayed on your Business Central reports.
Whether you need 24-hour or 12-hour time format, with or without AM/PM, RDLC’s flexible formatting functions make it easy to tailor the output to your business needs.
Thanks For Reading...!!
Regards,
Khushbu Rajvi
This was originally posted here.

Like
Report
*This post is locked for comments