Date Manipulation

pasensyoso_manigbas

Well-known member
Joined
May 19, 2006
Messages
64
Programming Experience
Beginner
hi mods,

i just want to ask for some hints on how to manipulate dates..
see for example i have "theDate" as starting and "endDate" as ending date.

i want to break the days, from theDate to endDate by 15 days and able to get the full date where the 15th fall...

how can i extract this? any idea would be of great help...
Looping thru dates in not applicable...:rolleyes:
 
I'm not quite sure what you're asking for. If you wanted to get the date of every fifteenth day from a start date to an end date it would be something like this:
VB.NET:
Dim startDate As Date = #1/01/2005#
Dim endDate As Date = #12/31/2005#
Dim myDate As Date = startDate

Do
    MessageBox.Show(myDate.ToLongDateString())
    myDate = myDate.AddDays(15)
Loop Until Date.Compare(myDate, endDate) > 0
Is that the sort of thing you want?
 
thanx.... im only up to the looping...
thanx for the hint...
 
Back
Top