datetime convert not seconds

johnkainn
johnkainn used Ask the Experts™
on
How do I convert datetime to 12.4. 21:50?
I.e. not year and not seconds.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
there is no built in way of doing it
you can try

select datepart(day, date_column) + '.' + datepart(month, date_column) + '. ' + datepart(hour, date_column) + ':' + datepart(minute, date_column)
Commented:
You could look at the CONVERT statement and use something like in here:
http://technet.microsoft.com/en-us/library/ms174450.aspx

If you convert the date to just a date and then take a LEFT(@string, 5) you could get the date and then do the same for the time.  
The above post would work as well.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial