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
Sie Ste
NA
196
184.4k
Select date problem
Dec 8 2011 10:30 PM
In a sql server 2008 r2 database, I am trying to obtain just the date portion of a datetime field in mm/dd/yyyy format. I basically just do not want the time portion of this field.
I have used statements like select MONTH(pay_date) + '/' + DAY(pay_date) + '/' + YEAR(payment_date) from cust_table. I keep getting errors.
Can you tell me what is wrong with the above select statement and/or can you show me a different way to obtain only the date in a mm/dd/yyyy format?
Reply
Answers (
1
)
Aggregate funtion in SQL Server
Drop in SQL