Microsoft
Software
Hardware
Network
Question : SQL convert time and date to just date
Hi, I want to convert a date field from time and date to just a date field, in a SQL select statement (Using SQL server) -
Currently I have Select TimeAndDateField from MyTable
I know I use the convert() function but I cant seem to get the rest of the sytax correct, Please help!
Answer : SQL convert time and date to just date
If you intend to use it as a datetime, this works too without convert
Select dateadd(d,0,datediff(d, 0, TimeAndDateField)) from MyTable
It strips the time portion away.
Random Solutions
KSH: Extracting lines that have first Word in the predefined list
how to connect blackberry internet connection
How do I print using only black ink with HP 6400?
what is reputation system in trust management?
IIS 7 Authorization rules icon missing
Excel VBA create Outlook Email format
Run an Outlook 2007 rule only if the mail is 1 week old
unlink post
connecting to a windows 2003 file share from a mac, folders are empty
Deleting A Row from a DataTable based on ID column