| | |
help with time.....
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2008
Posts: 23
Reputation:
Solved Threads: 0
hi, i'm currently doin a booking system...i have a problem regarding with the booking date...
Ok, lets say i'm booking a table on the 7th of october at 7.00pm which is 2 days from today...once i book the table it is booking from today...the timer runs from now until the 7th of october at 7.00pm...i want the timer to run at 6.00pm on 7th of october any idea how to solve this problem...here is my code
the reservation confirm button
the timer code...
thank u for ur help....
Ok, lets say i'm booking a table on the 7th of october at 7.00pm which is 2 days from today...once i book the table it is booking from today...the timer runs from now until the 7th of october at 7.00pm...i want the timer to run at 6.00pm on 7th of october any idea how to solve this problem...here is my code
the reservation confirm button
VB.NET Syntax (Toggle Plain Text)
Private Sub ButtonA_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CBButton1.Click Rpanel1.Hide() Dim time1 As DateTime time559 = FormatDateTime("5:00:00 PM", DateFormat.LongTime) time1001 = FormatDateTime("10:01:00 PM", DateFormat.LongTime) time1 = FormatDateTime(Hour(Btime1.Value) & ":" & Minute(Btime1.Value)) If time1 < time559 Or time1 > time1001 Then MsgBox("Booking Time is only available from 6.00 PM to 10.00 PM ") Rpanel1.Show() ElseIf Bdate1.Value < Today Then MsgBox("Error date is a past date, Enter again") Rpanel1.Show() Else PListBox1.Items.Add("Customer Name" & ControlChars.Tab & _ ControlChars.Tab & "Booking Date" & ControlChars.Tab & _ ControlChars.Tab & "Booking Time") status1 = "Booked" Table1.BackColor = Color.Khaki PListBox1.Items.Add(Bcusname1.Text & ControlChars.Tab & _ ControlChars.Tab & ControlChars.Tab & Bdate1.Value & ControlChars.Tab & _ ControlChars.Tab & FormatDateTime(Btime1.Value, DateFormat.LongTime)) End If
the timer code...
VB.NET Syntax (Toggle Plain Text)
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick Dim btimeA As DateTime Dim bdateA As DateTime bdateA = FormatDateTime(Bdate1.Value, DateFormat.ShortDate) btimeA = FormatDateTime(Btime1.Value, DateFormat.LongTime) If FormatDateTime(TimeOfDay, DateFormat.LongTime) = btimeA.AddMinutes(20) And FormatDateTime(Today, DateFormat.ShortDate) = bdateA Then MsgBox("Booking Time up Mr/Miss " & Bcusname1.Text & " is late,reservation canceled") Table1.BackColor = Color.PaleGreen status2 = "Available" End If
thank u for ur help....
![]() |
Similar Threads
- Favorite All Time Games (Geeks' Lounge)
- mIRC or Real Time Message Boards...in Linux (*nix Software)
- cts time out (Windows NT / 2000 / XP)
- Slowed Boot Time and Internet Connection Time. (Windows NT / 2000 / XP)
- Time out web pages w/text or drop boxes (Networking Hardware Configuration)
- Windows 95/98/98SE/MM = Time To UPGRADE (Windows 95 / 98 / Me)
- Run-Time Error..? (Windows NT / 2000 / XP)
- No time... bitch load of problems (Windows NT / 2000 / XP)
Other Threads in the VB.NET Forum
- Previous Thread: using generic procedures
- Next Thread: Will any one plz help me ??
| Thread Tools | Search this Thread |
.net 30minutes 2005 2008 access account arithmetic array arrays basic binary bing button buttons c# center check checkbox code combobox component connectionstring convert crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dropdownlist excel file-dialog folder ftp generatetags google gridview hardcopy image images inline insert intel internet listview mobile monitor ms net networking output passingparameters peertopeervideostreaming picturebox picturebox1 plugin port print printing problem problemwithinstallation project reports" save searchbox searchvb.net select serial server soap sql table tcp text textbox timer toolbox trim update updown user usercontrol vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web wpf






