TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nirmal Ghosh
NA
43
9.7k
How to change the long date format into short date format in
Sep 14 2016 10:34 AM
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
Reply
Answers (
5
)
sql statement top
Conversion From OpenXML to Nodes in Sql