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
How to store and fetch Date and time into a database in a particular format
Sep 5 2011 8:39 AM
Hi
datetime abc
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];
abc = _dt;
It display value as 05/09/11 06:09:00 PM , but i don't want to store PM
Thanks
Reply
Answers (
3
)
Date & Time
DateTime