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
djohncon
NA
16
0
Date Format
Jan 19 2005 5:13 PM
Hi , thanks to all for my previous question on data insertion error. this time I have a problem with the format returned by toString() in windows forms; This Sample code returns 01/01/0001 regardless of the data entered. strInsert += t_ID.Text+", "; strInsert += t_Dates.Text+")"; OleDbCommand inst = new OleDbCommand(strInsert,myConn) ; //Execute the statement inst.ExecuteNonQuery() ; statusBar.Text="Data Added to Database " ; //reset all the textboxes int i=int.Parse(t_ID.Text); DateTime ddt = new DateTime(); i++; t_ID.Text=i.ToString() ; // this format the same as shortDateTime.tostring() t_Dates.Text = ddt.ToString("dd/MM/yyyy"); statusBar.Text="Connected - Now you can Add records"; myConn.Close() ;
Reply
Answers (
5
)
Querying a dataset
Dataset lost if constructor called