How to convert string to a DateTime and compare it with another DateTime

Platform: ASP.NET| Category: Basic

VB.NET


Dim blntimeIsOk As Boolean = DateTime.Parse('15:00') < DateTime.Parse('08:00')
Response.Write(blntimeIsOk)

C#


bool blntimeIsOk = (DateTime.Parse('15:00') < DateTime.Parse('08:00'));
Response.Write (blntimeIsOk);

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.