hOURS AND MINUTES

Pauldohert

Something in here
Local time
Today, 14:32
Joined
Apr 6, 2004
Messages
2,101
This should be easy but I can't seem to do it - how do I format a datetime so I just see the hh:nn


Ta
 
Set your format to "Short Time " .
Would that help ?

Sorry in SQL :

DATEPART(portion, Hh:Mi)
 
Last edited:
Sorry didn't get that,

DatePart(hh,@Date)

gives me the hours

DATEPART(portion, Hh:Mi) ????

Cheers
 
Would this work :
DatePart(mi,n,@Date)
 
select cast(DatePart(hh,getdate())as varchar) + ':' + cast(DatePart(mi,getdate())as varchar)
 

Users who are viewing this thread

Back
Top Bottom