GOOD DAY PROGRAMMERS!! :twisted:
i just want to know How to do this kind of problem
http://www.daniweb.com/forums/attachment.php?attachmentid=23623&stc=1&d=1327489022
i just want to save the date interval
like i will select the Start Date and End Date
ex.
Start Date/Time: 26-Jan-12 / 03:00:00 PM
End Date/Time: 31-Jan-12 / 03:00:00 PM
how do i save the 27,28,29,30 date??? same time...
:idea: HELP please....
BTW here's my code i used to save the date and time...
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim xSQL As New System.Text.StringBuilder
xSQL.AppendLine("INSERT INTO tblSample")
xSQL.AppendLine("(DateDeliver,TimeDeliver,NumOfDays,DateReturn,TimeReturn)")
xSQL.AppendLine("VALUES")
xSQL.AppendLine("(@DD,@TD,@ND,@DR,@TR)")
Dim bReturn As Boolean
Try
ListView1.Items.Clear()
Using cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & My.Settings.AppDB1)
cn.Open()
Dim cmd As New OleDbCommand(xSQL.ToString, cn)
cmd.Parameters.AddWithValue("@DD", DateTimePicker3.Text.Trim)
cmd.Parameters.AddWithValue("@TD", DateTimePicker4.Text.Trim)
cmd.Parameters.AddWithValue("@ND", Button2.Text.Trim)
cmd.Parameters.AddWithValue("@DR", DateTimePicker5.Text.Trim)
cmd.Parameters.AddWithValue("@TR", DateTimePicker6.Text.Trim)
Dim n As Integer = cmd.ExecuteNonQuery()
If n <> 0 Then
bReturn = True
MessageBox.Show("Successfuly Added!")
Else
bReturn = False
MessageBox.Show("Fatal Error!")
End If
cmd.Dispose()
End Using
Catch ex As Exception
MessageBox.Show("ERRORdate:" & ex.Message.ToString, My.Application.Info.Title, MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
DateList()
End Sub