Accessing .NET properties of objects in Expressions

2 posts, 0 answers
  1. Magnus
    Magnus avatar
    11 posts
    Member since:
    Nov 2015

    Posted 25 Oct 2016 Link to this post


    I am trying to display the total time span in seconds for a report with two parameters; From (DateTime) and To (DateTime). The subtraction between two DateTime objects is a TimeSpan object, but the following expression fails, claiming that it cannot interpret '.':



    Is there an alternative syntax I can use, or is this kind of expression just not supported? 


    Best regards, 


  2. Stef
    Stef avatar
    3610 posts

    Posted 25 Oct 2016 Link to this post

    Hi Magnus,

    You can use an expression as follows, where variable are of DateTime type:
    = Parameters.Parameter2.Value.Subtract(Parameters.Parameter1.Value)

    The expression uses the access to Datetime methods, Subtract method in the example.

    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top