How we recognition Time Between 2 Time???
-
Hi I Want recognition Time BetWeen 2 Time For Example: Now Time is 04:00:00 And My SourceCode is : if time>=23:15:00 and Time<=07:15:00 Then Msgbox "ok" End if But 04:00:00 Not Greater Than 23:15:00 And My code Failed Please Help Me
Subtract the time from DateTime.Now, to know how much time has ellapsed, in the form of a TimeSpan. I don't see how this code would compile, is that really your code ? What is time, is it a string ? If it's a string, you've lost half the battle.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Hi I Want recognition Time BetWeen 2 Time For Example: Now Time is 04:00:00 And My SourceCode is : if time>=23:15:00 and Time<=07:15:00 Then Msgbox "ok" End if But 04:00:00 Not Greater Than 23:15:00 And My code Failed Please Help Me
you can use datediff also but timespan is better option depends on the your desired results try to look at cheat sheets also just for a quick reference , u can also Google cheat sheets here is one of the reference http://www.addedbytes.com/cheat-sheets/sql-server-cheat-sheet[^]
T = DateDiff("n", (T1), (T2)) T = TimeSpan.Compare(t1, t2)
Best Of Regards, SOFTDEV Sad like books with torn pages, sad like unfinished stories ...