Hi
i am getting error - Operator < cannot be applied to operands of type string and DateTime?
if (objGrpResult.GrpSessionStartDate != null)
if (Convert.ToDateTime(ltrlSessionDate).ToString("dd-MM-yyyy") < objGrpResult.GrpSessionStartDate)
Thanks
Rajkiran SwainPosted Apr 19, 2023, 4:30 PM
Ramco RamcoPosted Apr 19, 2023, 3:37 PM
Hi Rajkiran
It is giving error - Cannot convert from System.Web.UI.WebControls.Literal to string on ltrlSessionDate in below line
DateTime sessionDate = DateTime.ParseExact(ltrlSessionDate, "dd-MM-yyyy", CultureInfo.InvariantCulture);
Thanks
Rajkiran SwainPosted Apr 19, 2023, 3:15 PM