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
Excel String
asp.net datalist showing images
SQL 2005 Backup to network location, with multiple fulls and tlogs
gpupdate problem Windows 7 Professinal 32 bit
how to get authorized certificate for two domains for SBS 2008?
What is going on with my Outlook 2010
In ComboBox, Adding - Select Item on index -1
Update table with SUM from another table.
Convert Excel file with multiple worksheets to multiple csv files
Fetch records from List A that do not exist in List b using LINQ