Solved

Displaying dates with SQL server 2005

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

863 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