
Kent Hoang
Top achievements
Rank 1
Kent Hoang
asked on 02 Sep 2009, 03:50 PM
in my DB, I have submit date & Due Date field. I added a textbox & I try to calculate the past due date but it throw me an error
can someone help me with this?
= Fields.Date - Fields.[DueDate] (I got error here)
can someone help me with this?
= Fields.Date - Fields.[DueDate] (I got error here)
9 Answers, 1 is accepted
-1
Hello Kent Hoang,
Currently Telerik Reporting does not support date calculations. Anyway there are a couple of ways to workaround this limitation:
Regards,
Svetoslav
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Currently Telerik Reporting does not support date calculations. Anyway there are a couple of ways to workaround this limitation:
- perform the calculations at the data source level. For example if the data comes from an SQL server you can subtract the dates in your SQL query;
- a user-defined function that performs the date calculations. For more information please see Using Expressions.
Regards,
Svetoslav
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
1

Kent Hoang
Top achievements
Rank 1
answered on 02 Sep 2009, 04:15 PM
hmm, I'm trying to convert some of my Crystal Report to web base version. My crystal reports have some advance calculation. Date subtraction is just a simple thing & Telerik cannot do it? It is so inconvenience. You need to update your software please
Thanks
Thanks
-1
Hello Kent Hoang,
Thank you for the feedback. Indeed this issue is already in our TODO list and it is just a matter of time when we will fix it. Until then it is best to stick with the suggested workarounds.
Regards,
Svetoslav
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Thank you for the feedback. Indeed this issue is already in our TODO list and it is just a matter of time when we will fix it. Until then it is best to stick with the suggested workarounds.
Regards,
Svetoslav
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0

Casey
Top achievements
Rank 1
answered on 14 Mar 2013, 09:31 PM
Has this issue been addressed? I'm trying to use ".AddDays" in one of my textboxes in the report, and it errors out. This would be a nice feature to have.
Thanks!
Casey
Thanks!
Casey
0
Hello Casey,
Peter
the Telerik team
DateTime.AddDays method is expecting argument of type double. Check out the following sample expression:
=CDate("2013-03-13").AddDays(CDbl(1))
Peter
the Telerik team
Telerik Reporting Q1 2013 available for download with impressive new visualizations. Download today from your account.
0

Casey
Top achievements
Rank 1
answered on 19 Mar 2013, 03:42 PM
I have a DateTime property in my datasource. I'm trying to do MyDateTimeProperty.AddDays(MyDoubleProperty), and it isn't working.
I receive the following error:
"An error has occurred while processing TextBox 'textBox11': The expression contains undefined function call AddDays()."
Thanks!
Casey
I receive the following error:
"An error has occurred while processing TextBox 'textBox11': The expression contains undefined function call AddDays()."
Thanks!
Casey
0
Hi Casey,
Try the following expression:
Peter
the Telerik team
Try the following expression:
=CDate(MyDateTimeProperty).AddDays(CDbl(MyDoubleProperty))
Greetings,Peter
the Telerik team
Telerik Reporting Q1 2013 available for download with impressive new visualizations. Download today from your account.
0

Casey
Top achievements
Rank 1
answered on 20 Mar 2013, 03:11 PM
Thanks Peter, this works. I was able to find it in the documentation too, now that I know what I should have been looking for... I wasn't aware that I would have to convert my DateTime object to a DateTime to use any of the DateTime methods.
Casey
Casey
0

Doors
Top achievements
Rank 2
Iron
answered on 16 Jun 2022, 05:01 PM
Since 2009 still there is no DATEDIFF Function there must be very long TODO list
Todor
commented on 21 Jun 2022, 07:29 AM
Telerik team
Hello Kerem,
You may subtract Dates and you will get the corresponding TimeSpan. For example, the following Expression returns the result '63.00:00:00':
= Date(2022, 10, 20) - Date(2022, 8, 18)
As another example, the next Expression will return the time of the current day:
= Now() - Today()
For more details, you may see the Date and Time functions we provide.