September 15, 2008 at 3:37 am
Hi
I want datetime format like :
09/23/2008 11:01:00 PM
How to get it using getdate() function?
Thanks in advance.
September 15, 2008 at 4:50 am
CONVERT(NVARCHAR, GetDate(), 100) As Date - Nearest to what you want. See link below... Nothing stopping you from stringing sentence together...
(CONVERT(NVARCHAR, GetDate(), 101)) + ' ' + (RIGHT(CONVERT(NVARCHAR, GetDate(), 100),10))
September 15, 2008 at 5:14 am
it's better you don't.
Leave formatting to the client application !
p.s. only use Nvarchar if strictly needed !
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply