This is a migrated thread and some comments may be shown as answers.

Issue on textbox with date format

1 Answer 424 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sergio
Top achievements
Rank 1
Sergio asked on 05 Jan 2012, 10:55 AM
Hello,

I want to set a textbox with the next formula
[= "Date of " + Parameters.CALCDATE.Value]

For CALCDATE = '04/11/2011' The result is:

Date of 04/11/2011 00:00:00

The desired result is

Date of 04/11/2011

Format string is set to {0:d} but it does not work properly.
Instead I tried with

[="Date of" + Format({0:d}, Parameters.CALCDATE.Value)]

And it does not work either (it throws an error).

How can I set the format to this date?

Thank you very much.

Sergio.

1 Answer, 1 is accepted

Sort by
0
Accepted
Steve
Telerik team
answered on 09 Jan 2012, 03:52 PM
Hello Sergio,

The Format property would work if the value is DateTime, but in your case it is an expression. As explained in Member Access help article, in expressions you can access a member of an object, using the . (dot) character. You can call all public members of an object directly in the Expression Editor. So your expression could be changed to something like this:

= "Date of " + Parameters.CALCDATE.ToShortDateString()

Regards,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

Tags
General Discussions
Asked by
Sergio
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or