Home » FAQ » ASP.NET » Basic » How to convert string to a DateTime and compare it with another DateTime
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);
Platform BlazorASP.NETWinFormsWPF.NET MAUI
Question *
Answer (Optional)
Email (Optional)
Email address is only for further clarification on your FAQ request. It will not be used for any other purpose.
Please leave this field empty.
Share with