Dim d,d1 As Date Dim s As String d = e.Form.Controls("DateTimePicker1").value d1 = e.Form.Controls("DateTimePicker2").value For i As Integer = 0 To DateDiff("d",d,d1) s = s & "," & Format(d.AddDays(i),"MM-dd") Next e.Form.Controls("TextBox2").value = s.Trim(",")