Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Displaying dates with SQL server 2005

Posted on 2013-05-17
3
Medium Priority
?
255 Views
Last Modified: 2013-05-17
Is there an easy way/function to get in a stored procedure a date in "words" and a a language of my choice
For example, getting the date '2013-05-17' in english as something like Friday 1 May 2013
or in french as Vendredi 1 Mai 2013
0
Comment
Question by:LeTay
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
Ross Turner earned 2000 total points
ID: 39174181
0
 
LVL 7

Expert Comment

by:Ross Turner
ID: 39174191
0
 
LVL 25

Expert Comment

by:Lee Savidge
ID: 39174197
Here's an example.


declare @lang nvarchar(256)
declare c cursor for
select name from  sys.syslanguages

open c

fetch next from c into @lang

while @@fetch_status = 0
begin
set language @lang
select datename(weekday, getdate()), convert(nvarchar(100), getdate(), 113)
fetch next from c into @lang
end

close c
deallocate c

Open in new window

0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question