Hi,
How do I add days to a "datetime" type item?
For example, I have:
Dim m As DateTime = 12-05-2006
How do I add 5 days to this item, so that its content becomes 17-05-2006 ?
I tried to cast with an integer, but it's not possible.
Printable View
Hi,
How do I add days to a "datetime" type item?
For example, I have:
Dim m As DateTime = 12-05-2006
How do I add 5 days to this item, so that its content becomes 17-05-2006 ?
I tried to cast with an integer, but it's not possible.
VB Code:
Dim m As New DateTime(2006, 12, 5) MessageBox.Show(m.ToShortDateString) m = m.AddDays(5) MessageBox.Show(m.ToShortDateString)
excellent, thanks very much mate
No problem, mark the thread resolved using the thread tools if this particular question has been answered.