Solved

Displaying dates with SQL server 2005

Posted on 2013-05-17
3
253 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
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 arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
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:

623 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