Tuesday, 1 November 2016

Report By Date

if (ByDate.Checked)
            {
                DateTime dtfrom = dtpFrom.Value;
                string dtfromdate = dtfrom.ToString("yyyy-mm-dd");
                string dtfromdatetime = dtfromdate + " " + "00:00:00";
                DateTime dtto = dtpTo.Value;
                string dttodate = dtto.ToString("yyyy-mm-dd");
                string dttodatetime = dttodate + " " + "23:59:59";

                string addquery = string.Format("select * from gatepass where date between '" + dtfrom + "' AND '" + dtto + "'");
                DataTable dt = qc.DataReaderTable(addquery);

No comments:

Post a Comment