Link to home
Start Free TrialLog in
Avatar of mruff
mruff

asked on

db2 convert TIME to string 'HH24MISS'

db2 convert time to string
Hi I want to convert a time files (NOT Date, NOR timestamp) to a string representation with the format: 'HH24MISS'

I've tried:
1. TO_CHAR(mytime, 'HH24MISS')
2. VARCHAR_FORMAT(mytime, 'HH24MISS')
3. SUBSTR(LPAD(mytime, 6, '0'), 1, 2) ...

None of it worked
Many thanks for your support
Avatar of dfke
dfke

Hi,

What is it that you mean by 'a time files'. Can you be more specific?

Cheers
Avatar of mruff

ASKER

Sorry typo:
A db2 database field of type TIME
Hi mruff,

What version of DB2 are you running?  And what's the underlying server?
ASKER CERTIFIED SOLUTION
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial