i have made a stored procedures in sql server 2008 i want to change the long date format into short date??Please help need it urgently.. project is in process
What I have tried:
CREATE PROCEDURE [dbo].[OnelinePODate]
AS
BEGIN
Select Main.Ibill_no,
Left(Main.PoNo,Len(Main.PoNo)-1) As "PoNo",Left(Main.PoDt,Len(Main.PoDt)-1) As "PoDt"
From
(
Select distinct ST2.Ibill_no,
(
Select ST1.PoNo + ',' AS [text()]
From dbo.items_sold ST1
Where ST1.Ibill_no = ST2.Ibill_no
ORDER BY ST1.Ibill_no
For XML PATH ('')
) [PoNo],
(
Select cast(ST1.podate as char(11)) + ',' AS [text()]
From dbo.items_sold ST1
Where ST1.Ibill_no = ST2.Ibill_no
ORDER BY ST1.Ibill_no
For XML PATH ('')
) [PoDt]
From dbo.items_sold ST2
) [Main]
END