DateDiff

If you want to find the number of days difference between two DateTime values, there’s a couple ways you can do it.

You can cast the values to a String (formatted to strip off the time), then cast them back to a DateTime, then subtract them, for a total of five operations:

Dim resultFromTheBADWay As Integer = Convert.ToDateTime(Now.ToShortDateString()).Subtract(oldestCaseAction.StartDate.ToShortDateString()).Days

You can leave the values in their native DateTime format and use a single native Date operation:

Dim resultFromTheGOODWay As Integer = DateDiff(DateInterval.Day, Now, oldestCaseAction.StartDate)

Use your judgment on determining the better option for this scenario, as long as you use the second method.