Solved

Displaying dates with SQL server 2005

Posted on 2013-05-17
3
250 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 500 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

813 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now