problem while converting datetime diff in vb to c#
-
hi any body please help me iam converting vb.net code to c# while doing this i got problem near convertion datediff(dateinterval.day,submitted,completed) with ths above code in vb iam getting output in days i.e 23 but in c# iam getting thre output as 23.14:33:01 can anybody resolves it here i used the datetime completed=datetime.today and submitted=datetime.minvalue
-
hi any body please help me iam converting vb.net code to c# while doing this i got problem near convertion datediff(dateinterval.day,submitted,completed) with ths above code in vb iam getting output in days i.e 23 but in c# iam getting thre output as 23.14:33:01 can anybody resolves it here i used the datetime completed=datetime.today and submitted=datetime.minvalue
How u r getting this "23.14:33:01" value, I mean in which variable u are saving it, can u please post the hole code???
-
How u r getting this "23.14:33:01" value, I mean in which variable u are saving it, can u please post the hole code???
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.SqlClient; public partial class ExtEltSetTimeStamp : System.Web.UI.Page { protected void Page_Load(object sender, System.EventArgs e) { label3.Text = " Showing COMPLETED Elements "; if (Session != null) { } else { Response.Redirect("Login.aspx"); } if (!Page.IsPostBack) { GridView1.PageIndex = 0; GridView2.PageIndex = 0; fillgridview(); label2.Text = "1 out of" + GridView1.PageCount; label2.Text = "1 out of" + GridView2.PageCount; GridView2.Visible = false; } } public void fillgridview() { DataSet ds; // DataRow[] dr; try { int y = 0; bool iscompleted = false; DateTime submitted = DateTime.Today; DateTime completed = DateTime.MinValue; TimeSpan ts; //DataTable tbliscompleted = new DataTable(); //DataTable tblinprogress = new DataTable(); //string columnname=""; //ds = clsSqlDataProvider.ExtElement_GetRequisitionTime(Convert.ToInt32(Session["LoginId"].ToString()), "1"); clsSqlDataProvider dp = new clsSqlDataProvider(); ds = dp.ExtElement_GetRequisitionTime(112, "1"); DataTable dtCompleted = new DataTable(); dtCompleted.Columns.Add("Description", System.Type.GetType("System.String")); dtCompleted.Columns.Add("Scope", System.Type.GetType("System.String")); dtCompleted.Columns.Add("GICSCodeDesc", System.Type.GetType("System.String")); dtCompleted.Columns.Add("SubmittedDate", System.Type.GetType("System.DateTime")); dtCompleted.Columns.Add("DcDate", System.Type.GetType("System.DateTime")); dtCompleted.Columns.Add("EADate", System.Type.GetType("System.DateTime")); dtCompleted.Columns.Add("HUDate", System.Type.GetType("System.DateTime")); dtCompleted.Columns.Add("PSDate", System.Type.GetType("System.DateTime")); dtCompleted.Columns.Add("DUDate", System.Type.GetType("System.DateTime"));