[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 752
  • Last Modified:

datetime cast hours minutes

I would like to return only minutes and hours from datetime.
For example GetDate() should return 13:40
How is best to do that?
0
johnkainn
Asked:
johnkainn
1 Solution
 
Den_HBRCommented:
SELECT CONVERT(VARCHAR(5), GETDATE(), 108)
0
 
Reza RadCommented:
select Convert(char(2),datepart(Hour,getdate()))+':'+convert(char(2),datepart(MINUTE,getdate()))
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now