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
How can I put a text editor inside a Access form?
Cisco Catalyst 4500 and UPS recommendations
Multiplying a double by -1
Permissions of file server
SQL Express 2008 can't login using windows authentication
Getting a "postbacktrigger is not a known element" ASP.NET waring
Creating a disk image of a SCO Unix 5.04 system through a network
query from US
Crystal Report XI: Report Footer prints on a separate page
mounting a remote share withing a local share on Linux