.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh
Melody Anderson
Eminent IT

Home >> Articles >> General >> Post New Resource Bookmark and Share   

 Subscribe to Articles

How to Compare Time

Posted By:Syed Shakeer Hussain       Posted Date: April 12, 2009    Points: 10    Category: General    URL: http://www.dotnetspark.com  

How to Compare Time
Dim t1 As String = DateTime.Parse("3:30 PM").ToString("t")
Dim t2 As String = DateTime.Now.ToString("t")
If DateTime.Compare(t1, t2) < 0 Then
    Response.Write(t1.ToString() & " is < than " & t2.ToString())
    Response.Write(t1.ToString() & " is > than " & t2.ToString())
End If

 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend