Dienstag, 2. Februar 2010

SQL Server 2005 Reporting Services: customize Date Format

Problem:
The date format in a Reporting Services report is not in the desired manner.

Solution:
In BIDS create or open your Reporting Services project.
Open your rdl-File.
Choose tab "Layout".
Rightclick a table field with date values (for instance "=Fields!TimeSampled.Value").
In context menu choose Properties.
Window "Textbox Properties" opens.
Choose tab "Format".
On tab "Format" choose the elipsys button (...) near "Format code".
Window "Choose Format" opens.
On Window "Choose Format" choose Radiobutton "Custom" and type "yyyy-MM-dd HH:mm:ss" (without quotations).
Click ok twice.

This will generate a date like 2010-01-31 23:59:00.

Keine Kommentare: