Date substraction
how to substract date from database , which is showed on label
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Farhan ShariffPosted Sep 8, 2014, 3:52 AM
Payal SharmaPosted Sep 8, 2014, 3:25 AM
_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