Calculating Dates
Calculating Dates
I need to add and subtract dates
I created an expression and tried to use a VB expression. I need to add one day to the Expired Date to create a new start date.
NewStart =ExpiredDate.AddDays(1)
I then need to add 365 days to the Expired Date to get a New End date
NewEnd = ExpiredDate.AddDays(365)
The users manual says I can use VB expressions in a VB report. However, all I find are errors and the AddDays function is not part of Date,etc.
I have added Microsoft.VisualBasic.dll to the registered assemblies. Still no success.
How do I add and subtract dates in Stimulsoft Reports?
I created an expression and tried to use a VB expression. I need to add one day to the Expired Date to create a new start date.
NewStart =ExpiredDate.AddDays(1)
I then need to add 365 days to the Expired Date to get a New End date
NewEnd = ExpiredDate.AddDays(365)
The users manual says I can use VB expressions in a VB report. However, all I find are errors and the AddDays function is not part of Date,etc.
I have added Microsoft.VisualBasic.dll to the registered assemblies. Still no success.
How do I add and subtract dates in Stimulsoft Reports?
Re: Calculating Dates
The only way I found to do this was in the data query. That works but it does seem that you should be able to to add and subtract dates on the report side.
If someone has the syntax, and can tell which report object to use (expression, calculated column, etc.) to place it I would appreciate the information.
If someone has the syntax, and can tell which report object to use (expression, calculated column, etc.) to place it I would appreciate the information.
Re: Calculating Dates
Hello.
The AddDays() function is working right in our product.
You don't nee to add any assemblies.
Maybe we missed something. Could you send us a sample that will help us to reproduce the issue?
Thank you.
The AddDays() function is working right in our product.
You don't nee to add any assemblies.
Maybe we missed something. Could you send us a sample that will help us to reproduce the issue?
Thank you.
Re: Calculating Dates
I am placing this in an expression
AddDays({liqBrand.Mand},1)
{liqBrand.Mand} is a date field.
It is not working.
AddDays({liqBrand.Mand},1)
{liqBrand.Mand} is a date field.
It is not working.
Re: Calculating Dates
Hello,
Please try to use the following expression:
{liqBrand.Mand.AddDays(1)}
Thank you.
Please try to use the following expression:
{liqBrand.Mand.AddDays(1)}
Thank you.
Re: Calculating Dates
Thanks that works! I must have placed the curly brackets in the wrong places. Is there an available list of the date and other functions? I have not located one and it would be a useful reference for me.
Re: Calculating Dates
Hello,
In the NET versions you can use any NET framework methods:
https://msdn.microsoft.com/en-us/librar ... .110).aspx
https://msdn.microsoft.com/en-us/librar ... .110).aspx
etc
Thank you.
In the NET versions you can use any NET framework methods:
https://msdn.microsoft.com/en-us/librar ... .110).aspx
https://msdn.microsoft.com/en-us/librar ... .110).aspx
etc
Thank you.