HOURS:MINUTES:SECONDS

Database

HOURS:MINUTES:SECONDS

Hi there, I keep losing what I type out here on this site. I am attempting to retrieve only hours:minutes:seconds from a database table and column: PAT_ENC.CHECKIN_TIME. This is a DateTime field. Displayed as:
2010-09-15 12:45:00
2010-09-16 05:15:15

I need to retrieve only:
12:45:00
05:15:15

I also need to display this in a CASE statement. Something like the following:
CASE
when Pat_enc.Checkin_time between '18:30:00' and '19:29:00' then '6:30-7:29'
when Pat_enc.Checkin_time between '19:30:00' and '20:30:00' then '7:30-8:30'
END Shift_group

Not sure if I need to use an EXTRACT or TRIM function for what I need to see.

As it has been a loooooooooong time since I have done something like this, I will need some pretty detailed instructions on how to get this.

Thank you in advance for your time and assistance,

KMEscherich
Tags (1)