good evening everyone...

could anyone help me on this?

With a "time value", eg. 08:00:00...

i want to find the range that this value falls in using case statement...

i am not good in using the time format...

anyone can help?

This is just an example: (the code is not just an example)

datime = Now().ToString("hh:mm:ss")
Select Case datime
Case "08:00:00" To "09:00:00"
lblRange.Text = i.ToString()
Case "09:00:01" To "09:14:59"
lblRange.Text = (i - 0.25).ToString()
Case "09:15:00" To "09:29:59"
lblRange.Text = (i - 0.5).ToString()

Anyone can help?

Recommended Answers

Did you ever consider a TimeSpan structure?

Jump to Post

All 2 Replies

hi... thanks! the problem is solved!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.