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
ToBe
NA
164
94.1k
error converting datatype
Feb 27 2013 3:48 AM
Good morning
I have this 2 lines to get the date time
txtdate.Text= DateTime.Now.Date.ToString();
string dt = Convert.ToDateTime(txtdate.Text).ToString();
and i pass it to the stored procedure as parameter as following :
cmd.Parameters.AddWithValue("@Reg_Date", dt);
when it reach the
cmd.ExecuteNonQuery();
it will stop and give the error :
Error converting data type nvarchar to datetime
thanks in advance
Reply
Answers (
5
)
Viewing access ole object in ms word
[DllImport(“NetApi32.dll”… throws exception for first few