How would I increment Date with a value from a database.

Example: Date + Database Field value (random values)

(08/01/2011 + 5 = 08/06/2011)

Thanks in advance.

Try it this way:

Dim days As Integer = 12 'your value from DB! (one or the other - didnt know what you want
Dim months As Integer = 5 'your value from DB!
Dim [date] As DateTime = DateTime.Now 'some date !

'get new date (current date + days):
[date] = [date].AddDays(days)

'get new date (current date + months):
[date] = [date].AddMonths(months)

Try it this way:

Dim days As Integer = 12 'your value from DB! (one or the other - didnt know what you want
Dim months As Integer = 5 'your value from DB!
Dim [date] As DateTime = DateTime.Now 'some date !

'get new date (current date + days):
[date] = [date].AddDays(days)

'get new date (current date + months):
[date] = [date].AddMonths(months)

Great~ That exampled helped me form something a little bit different that worked.

Great. If this is it, you can complete the thread with setting it as answered.
If not, you can still ask questions ,regarding the thread`s topic.
Best regards,

This question has already been answered. Start a new discussion instead.