| | |
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 |
Tag cloud for VB.NET
.net .net2008 2008 access advanced application array basic beginner browser button buttons center click client code combo convert cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic eclipse excel exists fade filter forms function html images input lib listview map mobile module monitor msaccess net number objects open panel pdf picturebox picturebox2 port position print printing problem read regex remove right-to-left save search serial settings shutdown socket sorting sqldatbase sqlserver survey temperature textbox timer timespan transparency txttoxmlconverter user usercontol validation vb vb.net vb2008 vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web webbrowser winforms winsock wpf wrapingcode xml year






