2015-04-20 15:32:26.840
is the record in sql table field..how can i fetch only date from the table.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Govinda Rajulu YemineniRank #1,517 · 1K reputationPosted Jul 9, 2015, 4:56 AM EDT
Below approach works in Sql Server 2008 and above:
SELECTCONVERT(DATE, Column_Name)'Date Part Only' FROM Table_NameRESULT:DatePartOnly--------------2013-07-14Example 1:
SELECTCONVERT(VARCHAR(10), column_name, 112)'Date Part Only' FROM Table_NameRESULT:DatePartOnly--------------20130714Example 2:
SELECTCONVERT(VARCHAR(10), column_name, 111)'Date Part Only' FROM Table_NameRESULT:DatePartOnly--------------2013/07/14Ankit ShuklaRank #2,120 · 672 reputationPosted Jul 9, 2015, 4:32 AM EDT
Manoj BhoirRank #599 · 4K reputationPosted Jul 9, 2015, 4:36 AM EDT
sushma sharma15 reputationPosted Jul 9, 2015, 8:43 PM EDT
sushma sharma15 reputationPosted Jul 9, 2015, 8:44 PM EDT
Nilesh JadavRank #109 · 20.3K reputationPosted Jul 9, 2015, 8:52 PM EDT
Check this source:
Hope that helps thank you
Manoj BhoirRank #599 · 4K reputationPosted Jul 9, 2015, 8:55 PM EDT
sushma sharma15 reputationPosted Jul 9, 2015, 8:58 PM EDT
Manoj BhoirRank #599 · 4K reputationPosted Jul 9, 2015, 9:08 PM EDT
sushma sharma15 reputationPosted Jul 9, 2015, 9:20 PM EDT