Hi All,
How to get date only without time ? Here is my query
select p.company,p.ponum as orderNum, p.orderdate,v.name as supplier,p.shipcountry as country, Pr.Duedate as DeliveryDate, p.fob as Mode,p.termscode as terms,P.ShipName, (p.shipaddress1+ ',' + P.ShipAddress2 + ',' + ShipCity + ',' +ShipZIP ) as Deliverat, p.entryperson as Createdby,(p.shipaddress1 + ',' + P.ShipAddress2 + ',' + ShipCity + ',' + ShipZIP ) as Address, p.character01 as comments,p.approvalstatus,pr.ContainerID,Pr.TranType,P.CurrencyCode,P.ExchangeRate,pl.ponum,pl.poline as sno,pl.Partnum, pl.linedesc as Description, pl.ium as UOM,pl.orderqty as Qty,pl.xorderqty,Pl.unitcost as Rate,pl.docunitcost,pl.unitcost , (pl.orderqty * pl.unitcost) As Value1,(pl.orderqty * pl.docunitcost)As Value2,(Select currDesc from Currency where Company=P.company and BaseCurr=1 ) As curr1, (Select currDesc from Currency where Company=P.company and CurrencyCode=P.CurrencyCode ) As curr2 from podetail pl ,Porel Pr,poheader p, vendor v, Part Prt, AnalysisCd A where p.company = pl.company And p.company = pr.company And P.company = v.company and P.Ponum=pl.ponum and P.ponum=pr.ponum and Pl.poline=pr.poline and p.vendornum=v.vendornum and pl.company=Prt.company and A.Company = Pl.Company and Prt.PartNum=pl.Partnum and A.AnalysisCode = Prt.Mtl_AnalysisCode and A.AnalysisCode ='mlm' and P.company in ( 'COMP01')
p.orderdate = 2011-04-07 00:00:00.000, I want to get only date not time. How to get it?