I am working on an application that allows a user to select a time value from a combo box. A sample of the values in the combo box are as follows: 6:00 A.M., 12:00 P.M., 8:30 P.M., etc…. The value selected by the user is then stored in the database as a string (varchar) value. This was not a big deal at first since I wasn’t doing any calculations or time comparisons that involved these values. They were simply being displayed.
Now I have been asked to take the time value entered by the user and check to see if it falls within a specific time range. I have to somehow convert the string value to a DateTime value, for example 7:30 A.M. and check if it falls within the 5:30 A.M. to 2:30 P.M. range.
Can anyone please tell me how to accomplish this task.
The program is a Visual Basic program and the database is SQL SERVER 2000.
Thanks in advance,
RR
Now I have been asked to take the time value entered by the user and check to see if it falls within a specific time range. I have to somehow convert the string value to a DateTime value, for example 7:30 A.M. and check if it falls within the 5:30 A.M. to 2:30 P.M. range.
Can anyone please tell me how to accomplish this task.
The program is a Visual Basic program and the database is SQL SERVER 2000.
Thanks in advance,
RR