Date time fields

Stimulsoft Reports.NET discussion
Post Reply
eliasEspiralMS
Posts: 5
Joined: Thu May 29, 2008 3:25 am
Location: Spain

Date time fields

Post by eliasEspiralMS »

Hi,
I am doing a report, and I recover from database some dateTime fields, but I don't want that appears the time on the date field; is there any property on a DataTime field to hide the time data?

Thank you and sorry for my english


Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Date time fields

Post by Brendan »

If it's just a simple DateTime field in a text component you can use the "Text Format" property to format by Date.
The property is available from the Properties tab or if you right click the text field and select "Text Format".

There's also a quick access toolbar to the standard formats via the "Text Format" toolbar.

If the DateTime is part of a formatted string you can use the following expression

Code: Select all

{Format("{0:MM.dd.yyyy}", MyTable.MyOrderDate)}
where MyTable.MyOrderDate is a field from your datasource or a report variable.
Larusso
Posts: 32
Joined: Tue May 20, 2008 9:27 am
Location: Poland

Date time fields

Post by Larusso »

I' don't know if it is what You want but in textbox I think You should write something like this: {YourDataSource.YourTable.DateTimeField.ToString("dd-MM-yyyy")}
It would show date like: 29-05-2008 for today ;)
Post Reply