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
Nepethya Rana
NA
335
152.8k
Error : Conversion failed converting date and/or time
Jul 12 2017 11:13 AM
I have a table with InsertedDate column which data type is 'Date'.
This column has today's date stored as '2017-07-12'.
Now I am trying to count the from this table based on today's date,
my query is :
SELECT Count(ProductSold) from ProductSalesDetail WHERE(DATEPART(yy, 'InsertedDate') = 2017 AND DATEPART(mm, 'InsertedDate') = 07 AND DATEPART(dd, 'InsertedDate') = 12)
It throws error : Conversion failed when converting date and/or time from character string.
how do i perform this operation ?
Reply
Answers (
1
)
insert and update query
mutual friends query