How to get only the date from the sql server
Posted
by Pradeep
on Stack Overflow
See other posts from Stack Overflow
or by Pradeep
Published on 2010-03-24T14:47:17Z
Indexed on
2010/03/24
14:53 UTC
Read the original article
Hit count: 193
sql-server
|c#
this is what i want. but i have put only a specified date.
SELECT BookName, Author, BookPrice
FROM Book
WHERE Book.Book_ID = (
SELECT Book_ID
FROM Temp_Order
WHERE Temp_Order.User_ID = 25 AND Temp_Order.OrderDate='3/24/2010'
)
this is the date function i used. but it takes the time also. how to stop it. please help me
SELECT Book_ID, BookName,Author,BookPrice
FROM Book INNER JOIN FavCategory ON Book.Category_ID = FavCategory.Category_ID
WHERE FavCategory.User_ID = " + useridlabel.Text + " AND
OrderDate = **GETDATE()**
© Stack Overflow or respective owner