SQL date formatting -


i have datetime column in table. how display time?

say, value in column 2013-03-25 08:40:00.000. how display value 08:40 alone?

thanks in advance.

try

select convert(varchar, getdate(), 8)

or

select substring(convert(varchar, getdate(), 8), 1, 5) 

if want hh:mm

for more date formatting in sql server see this


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -