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
Jagjit Saini
NA
166
0
Fetching Datetime type value from database
Sep 6 2011 1:12 AM
Hi
When i run this statement select now in MySql it displays 2011-09-06 10:33:36 which is O.K
But through C#
datetime _dt;
string ConnectionStr = ConfigurationManager.ConnectionStrings["cnn"].ConnectionString;
MySqlDataAdapter da = new MySqlDataAdapter("select now()", ConnectionStr);
DataTable dt = new DataTable();
da.Fill(dt);
_dt = (DateTime)dt.Rows[0][0];
it displays 06-09-2011 2:04:09 which is wrong . I want which is dispplaed in MYsql it should display that .
Thanks
Reply
Answers (
2
)
Dynamically create Gridview with Dropdowns
My grid is not display on the web form