TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Reylin Mathew
NA
347
75.6k
Conversion failed when converting time from charcter
Feb 6 2019 5:01 AM
Conversion failed when converting time from character string
this is my code
TextBox txtstaff_time = gvCalender.Rows[row.RowIndex].FindControl("txtstaff_time") as TextBox;
TimeSpan timeSpan = TimeSpan.Parse(txtstaff_time.Text);
mg.ChangeCalender( txtstaff_time.Text);
public void ChangeCalender(string staffid, DateTime cal_date, string cal_day, string studoff, string stud_des, string staff_off, string staff_des,string stafftime, string nonstaff_off, string nonstaff_descr, string cal_year, string cal_month)
{
try
{
GetConnect();
SqlCommand cmd = new SqlCommand("CAL_TEACHING_EXIT_TIME=@stafftime where CAL_DATE=@cal_date and CAL_DAY=@cal_day", SqlCon);
cmd.Parameters.AddWithValue("@stafftime", stafftime);
cmd.ExecuteNonQuery();
SqlCon.Close();
}
catch (Exception ex)
{
throw ex;
}
}
CAL_TEACHING_EXIT_TIME the filed datatype is time(7);
but this error is show.. how to solve?
plz help me..
Reply
Answers (
2
)
Bootstrap Tabs control implementation in aspx page
How to view two tables data in gridview separately.