Get current time without Date

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))

And if using Sybase ASE 15+ you can use the current_time() function.

select current_time() -- returns 'time' datatype

You can also use the normal date/time-related and convert/cast functions against the resulting value as needed (eg, changing output format).

Tags:

Sql

Sybase