sql server - datetime2 conversion to specific datetime format -


whats best way of converting detetime2 dd/mm/yyyy hh:mm format in sql server 2008?

i column datetime2 stamps. looking convert @ select-ion time.

i had @ msdn reference conver(varchar(16), detetime2, 131) seems closes requirement. 2 issue it. date part doesn't 0 padded , converting time 12 hour clock.

anyone constructive suggestion welcome.

declare @x datetime2 = current_timestamp;  select @x      , convert(char(10), @x, 103) + ' ' + convert(char(5), @x, 108) ; 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -