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
mysql sww the duplicate on colum1 colum2 colum3
Access Database
Force feeding data to an ODD page number
How do I replace "(" using C# regex
drop index does not work for unique keys
Query based on date range and totals.
Powershell script to extract name, samaccount, and email server name from text file with users' display name
How to view my laptop with my blackberry?
Worksheet_Change event not running when DELETE key is used
Server 2003 demoting PDC and Primary DNS.