Date substraction
how to substract date from database , which is showed on label
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Payal Sharma27 reputationPosted Sep 7, 2014, 11:25 PM EDT
_c1.Execute2(str2, ref _dtt);
str2 = string.Empty;
str = "select REGN_DATE from cases grf_id='" + grf_id + "' and cc_year='" + year + "' order by cc_no asc";
_c1.Execute2(str, ref _dtt);
str = string.Empty;
DateTime dt1 = DateTime.Parse(str2);
DateTime dt2 = DateTime.Parse(str1);
TimeSpan span = dt2.Subtract(dt1);
lblorderdate.Text = str2;
span = Convert.ToDouble(lblorderdate.Text);
Kindly check this code and rectify it
Farhan ShariffRank #2,004 · 725 reputationPosted Sep 7, 2014, 11:52 PM EDT