Skip to main content
Hi all,

I already posted on this topic, and Ashley helped me out but I just can't get my syntax right and am a little desperate here (time is running short!). I desperately need some c# code to add to a server event.

I need to calculate a date based on process data fields.

On the plan page, the user specifies a due date. They also specify the number of days BEFORE that date they want certain actions performed.

So, I need some code to take [Due Date] and subtract [DaysTillReminder], giving me a new process datafield [ReminderDate].

Due Date is held as a date, DaysTillReminder is an integer.

I will be so greatful if someone can help... This project was begun by someone else in c# and I don't have the time or patience to shift it all to vb!!! Timespans and so on are making my headspin.

Many, many thanks

Richard
Hi Richard,

Given that you have used the standard DateTime class convert your "DaysTillReminder" into a TimeSpan class and use the Subtract method of the DateTime class. The resultant DateTime can then be placed back into the process instance variable for "ReminderDate".

Hope this helps

Graham
Thanks Graham, I will give this a try.

Cheers!

Rich

Reply