Is there any other alternative for getting time part of a datetime type variable than using datepart()?
Printable View
Is there any other alternative for getting time part of a datetime type variable than using datepart()?
What specifically do you want to get? If you want the entire time part, how about: CONVERT(varchar, getdate(), 108)
Yes, I wanted the same. Thanks for your help.
As I need the miliseconds to, I'll use 114 instead of 108
CONVERT(varchar, getdate(), 114).