Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
wided
Posting Yak Master
218 Posts |
Posted - 2010-10-13 : 12:48:32
|
how can i have a name of a dayexemplei want to have a result "Monday" if my var input is a date (11/10/2010)thanksPS: i need the result in frensh (Lundi) |
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-10-13 : 12:55:25
|
select datename(dw,getdate()) --Friday select datepart(dw,getdate()) --6 One way to get the name in frensh(Lundi) is using the case statement and substituting the value based on datename.There may be other methods too. I need to check out on that. |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2010-10-13 : 16:01:04
|
[code]set language frenchselect datename(dw,'11/10/2010') as DW[/code]Results:[code]DW ------------------------------ lundi[/code]CODO ERGO SUM |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-10-14 : 04:27:53
|
quote: Originally posted by Michael Valentine Jones
set language frenchselect datename(dw,'11/10/2010') as DW Results:DW ------------------------------ lundi CODO ERGO SUM
Cool..I learned something new today. |
|
|
wided
Posting Yak Master
218 Posts |
Posted - 2010-10-14 : 04:52:46
|
thanksit is okthis is what i need |
|
|
|
|
|