|
9B? Wow...
Do you want to convert it to an actual time data type, or a string?
Time would be my recommendation...
select
time(timestamp_format(right(digits(int(200))
,4)
,'HH24:MI'))
from sysibm.sysdummy1
If you really want a string, throw a VARCHAR_FORMAT in there instead of TIME
select
varchar_format(
timestamp_format(right(digits(int(200))
,4)
,'HH24:MI')
,'HH24:MI')
from sysibm.sysdummy1
Charles
On Fri, Sep 25, 2020 at 9:38 AM Dean Eshleman<Dean.Eshleman-d3hNrR/acMxWk0Htik3J/w@xxxxxxxxxxxxxxxx>
wrote:
Hi,
I have a field in file defined as 9B 0 that represents a time in hours and
minutes. I want to display the value as HH:MM using SQL. I assume it
involves casting the value to a character. However, I can't figure out how
to keep a leading zero for a time like 02:00 that is in the file as 200.
Any ideas?
Dean Eshleman
Software Development Architect
Everence
1110 North Main Street
PO Box 483
Goshen, IN 46527
(800) 348-7468 ext. 3528
(574) 533-9515 ext. 3528
[Join our Talent Network]<http://www.everence.com/careers>
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.