Link to home
Start Free TrialLog in
Avatar of mousemat24
mousemat24

asked on

Set Date to be the end of the following month?

Hi there wonder if you can help me?

If I have a variable called:

DateTime getLastMonthDate = new DateTime();

How do I set getLastMonthDate to be the end of the following month?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Thalox
Thalox

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Thalox
Thalox

oops,

should be
getLastMonthDate = getLastMonthDate.AddDays(-1);
Avatar of mousemat24

ASKER

Thalox

Thanks for that!! thats what I wanted
where did Thalox come from :-S ? LOL