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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 date convert

Author  Topic 

slimt_slimt
Aged Yak Warrior

746 Posts

Posted - 2007-11-20 : 07:09:49
i'm using:
select
CONVERT(nvarchar(30), CAST('2007-11-24' as nvarchar(30)), 5)

and i want to convert entered format '2007-11-24' to '24-11-2007'.

what should be the fastes way? :)

thank you

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-11-20 : 07:20:16
[code]select
CONVERT(nvarchar(30), cast('2007-11-24' as datetime), 105)[/code]

But frankly you should never do formatting from backend.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

slimt_slimt
Aged Yak Warrior

746 Posts

Posted - 2007-11-20 : 08:10:47
do you know how can i convince report server to use this?
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-11-21 : 00:57:26
quote:
Originally posted by slimt_slimt

do you know how can i convince report server to use this?


If you want to format it at SSRS, then use format function there

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -