If rs("test_date") > Now() Then sb.Append(DateDiff("d", Now(), rs("test_date")) & " days away") Else
if (Convert.ToDateTime(rs["test_date"]) > DateTime.Now) { sb.Append(DateDiff("d", DateTime.Now, rs["test_date"]) + " days away"); }
TimeSpan diff = (DateTime)rs["test_date"] - DateTime.Now; int daysAway = diff.TotalDays; sb.AppendFormat("{0} days away", daysAway);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)