Attaching the excel file, please check why the datevalue is coming from excel not able to convert it into datetime for datetime calculations.Cell “I2” has a date and “J2” has a time, we have to convert it into datetime and calculate the diffrence in minutes from Date.Now
Dim datePart As DateTime = DateTime.Parse(dateString)
Dim timePart As DateTime = DateTime.Parse(timeString)
Dim combinedDateTime As New DateTime(datePart.Year, datePart.Month, datePart.Day, timePart.Hour, timePart.Minute, 0)
Dim now As DateTime = DateTime.Now
Dim difference As TimeSpan = now.Subtract(combinedDateTime)
Dim minutesDifference As Double = difference.TotalMinutes