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
Shivaraj Poojary
NA
92
314.2k
How to seperate date and time while retrieving from sqlserver 2005
Apr 27 2011 12:44 AM
Hi Experts...
I have stored "DateTime" format in the database, but i need only "date" at the time of retrive. How to do this? Please help me..
I have the following code
SqlConnection con = new SqlConnection("Integrated Security=SSPI;Persist Security Info=False;User ID=CRYSYS1-DESKTOP\\Student;Initial Catalog=StdLab;Data Source=CRYSYS1-DESKTOP\\SQLEXPRESS");
con.Open();
SqlCommand cm = new SqlCommand("SELECT MAX(DateTime) as dd from TB_StudentLogin",con);
SqlDataReader dr = cm.ExecuteReader();
dr.Read();
Reply
Answers (
8
)
Connection String question
Gridview first ROW