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
SBS 2008 / Exchange 2007 intermittent email delivery issues
Acer aspire 3020 wireless button
htaccess change url to lowercase using RewriteMap
Parsing a HttpResponse (C++)
crawl infopath form attachments
2000 member servers in a domain with Exchange 2010
merge events from one calendar to specific users calendar
Batch File Check For Numeric Digits
Regex for number and string
Database Design Question - SQL Server