Hi,
I have a dropdownlist which is bound to sql table's column containing time type In the table it is displayed with 8 characters and when I open the dropdown list it lists them with additional zeroes at the end
I tried with
DropDownList4.DataTextField = "TimeFrom".Substring(0, 8);
but nothing changed
Can anybody help me please how to solve this? I want only this format hh:mm:ss as it is in the sql table or only hh:mm
Thank you in advance
Ramesh MaruthiPosted Sep 10, 2014, 12:01 PM
NelPosted Sep 10, 2014, 8:45 AM
Thanks Ramesh, but I found my error
I forgot to change the stored procedures after I changed the type time in the table
Now the problem is solved
Ramesh MaruthiPosted Sep 9, 2014, 5:37 PM
DateTime.TryParseExact(TimeFrom, "hh:mm", null, DateTimeStyles.AssumeLocal, out result);