Solved

Displaying dates with SQL server 2005

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

760 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

20 Experts available now in Live!

Get 1:1 Help Now