How would i automatically set the end date when there's a start date?

85 views Asked by At

I have my admin with dynamic data working fine. But in one table i have a start date and an end date. If the end date is empty i would like to automatically set it to whatever the start date is set to (so that i don't have to go through a bunch of months/years just to set the date a week later to the start date. It is primarily when I'm creating new items this feature would be neat to have.

1

There are 1 answers

0
hunter On
DateTime start = DateTime.Now;
DateTime end = start.AddDays(7);