How do I get the current time only?
select getdate()
Gives me:
Dec 16 2016 5:41PM
I want this result:
5:41PM
You can convert the GETDATE()
results to a TIME
datatype to pull the current time:
Select Convert(Time, GetDate())
You can do that pretty simply; if I correctly understood your problem.
SELECT CAST('INSERT THE TIME HERE' AS TIME(0))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With