PostgreSQL has a "time" data type.
select current_timestamp::time(0) -- or
select cast(current_timestamp as time(0))
now
time without time zone
--
06:51:58
In PostgreSQL, you can't cast time to timestamp.
Timestamps contain a date as well as a time--which date should PostgreSQL use? There's no way to know. So PostgreSQL simply doesn't allow that kind of cast.
You can add values of type "time" to dates and to timestamps. So expressions like these will work.
select date '2001-01-01' + '13:43'::time(0)
select '2001-01-01'::date + '13:43'::time(0)
select (current_timestamp + '13:43'::time(0))::timestamp(0)
Also, the standard SQL CAST() works like you'd expect.
select cast(current_timestamp as time(0))
JoinTiming?datetimein SQL Server.