Look up CONVERT in BOL
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Hitz" <anonymous (AT) discussions (DOT) microsoft.com> wrote
Quote:
Hi guys,
I am using Sql Server2k. In the database i have one field called
'orderdate' as datetime. Now, i want to compare the 'orderdate' falling in a
|
particular period of date. So, i am writing down the query for that which is
as follows:
Quote:
select orderid,customerid,orderdate as orderdate from orders
where orderdate='07/07/2003'
Now, the outcome of this result is zero though i have got orders
on this date. As, the value of orderdate is being stored as datetime i have
|
to specify the datetime. But, is there any way to convert or format the
database 'orderdate' to only date and not the time so i can search for that
date. Any help would be appreciated.