protected void Load_EffectiveDates() { DataTable dt = BLL_PB_PortageBill.Get_Crew_Welfare_Effective_Dates(UDFLib.ConvertIntegerToNull(ddlVessel.SelectedValue)); UDFLib.ChangeColumnDataType(dt, "Effective_Date", typeof(string)); if (dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { if (!string.IsNullOrEmpty(dr["Effective_Date"].ToString())) { dr["Effective_Date"] = UDFLib.ConvertUserDateFormat(Convert.ToDateTime(dr["Effective_Date"].ToString()).ToString("dd/MM/yyyy"), UDFLib.GetDateFormat()); } } } ddlEectiveDates.DataSource = dt; ddlEectiveDates.DataTextField = "EFFECTIVE_DATE"; ddlEectiveDates.DataValueField = "EFFECTIVE_DATE"; ddlEectiveDates.DataBind(); ListItem liSelect = new ListItem("ALL", "0"); ddlEectiveDates.Items.Insert(0, liSelect); }