Adding Days to a Date

Stimulsoft Reports.NET discussion
Post Reply
Ink
Posts: 50
Joined: Sat Jul 02, 2011 2:26 am
Location: UK

Adding Days to a Date

Post by Ink »

Hi,

I have a report which contains some dates. I need the user to pass in a number of days to add to this date.

For example 'StartDate' exists in the report, say 31/01/2013 (in dd/mm/yyyy) - the date will be different on each record
The user passes is 'NumberOfDaysToAdd', say 10 (the 10 will be constant for the life of the report, so all StartDates need to add 10)
I need to Calculate 'EndDate' as 'StartDate'+''NumberOfDaysToAdd', so I would expect my EndDate to equal 10/02/2013 (in dd/mm/yyyy)

Can you advise how I can do this as I cannot add a variable directly to a date?

Thanks,

Jon.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Adding Days to a Date

Post by HighAley »

Hello.

You could do it with C# or VB.NET method.
http://msdn.microsoft.com/en-us/library ... ddays.aspx

Thank you.
Post Reply