How do I add days to a dateTime.Today()????

1. Senior Member
Join Date
Dec 1969
Posts
660

## How do I add days to a dateTime.Today()????

I need to add days to a dateTime.Today() to expire a set number of days from today. How do I add the days?

2. Senior Member
Join Date
Dec 1969
Posts
2,334

## RE: How do I add days to a dateTime.Today()????

Check datediff function

3. Senior Member
Join Date
Dec 1969
Posts
660

## subtract?

That give me the ability to subtract by comparison, but not add.<BR>I&#039;m trying to use the <BR><BR>Dim rDate as string = DateTime.Today()<BR>rDate = DateTime.op_Addition(120,0)<BR><BR>To get a new date of 6 months...or 120 days...but it&#039;s giving me:<BR><BR>BC30311: A value of type &#039;Integer&#039; cannot be converted to &#039;Date&#039;.<BR>

4. Senior Member
Join Date
Dec 1969
Posts
660

## Yup....math is a bit off...lol

182 days for 6 months.

5. Senior Member
Join Date
Dec 1969
Posts
660

## Basically....

All I need to do is take the dateTime.Today() and add 365 days to it to give me next years date from today.

6. Senior Member
Join Date
Dec 1969
Posts
660

## WOOHOOOOO!........................DOH!!!!!

Ok....I can actually use the:<BR><BR>Dim rDate As Date = Now() <BR>rDate = rDate.AddDays(365)<BR><BR><BR>BUT...how do i get it to use the date only without the time???

7. Senior Member
Join Date
Dec 1969
Posts
2,334

Will add 3 days to today&#039;s date.

8. Senior Member
Join Date
Dec 1969
Posts
660

## RE: WOOHOOOOO!........................DOH!!!!!

Jeez.....shoulda thought about that before I posted it. Is it good to still be using VB in VB.NET????

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•