vb.nettimeofday

How can I compare two times in VB.net


I want to compare two times in VB.net:

I have 1:42:21 PM and I want it to compare with TimeOfDay in VB.net how can I do that?


Solution

  • New DateTime(1, 1, 1, 13, 42, 21) > TimeOfDay
    

    Or you can enclose a DateTime expression in # signs:

    TimeOfDay > #1:42:21 PM#