Page 1 of 1

Date time fields

Posted: Thu May 29, 2008 3:30 am
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



Date time fields

Posted: Thu May 29, 2008 3:36 am
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.

Date time fields

Posted: Thu May 29, 2008 3:37 am
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 ;)