var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Db2 - convert timestamp to Date and time
I am having problems trying to convert a timestamp in milleseconds to date and time.
This is what I have been trying but it doen't like the format :-
WHEN JST_JOB_STREAMS.JST_START_OFFSET <> -1 THEN to_char (to_date(mod(round(JST_JOB_STREAMS.JST_START_OFFSE T/1000),86400), 'SSSSS' ), 'HH24:MIS')
Thanks in advance
Rather than showing an attempted solution that does not work, it might make more sense to tell us what you have as the input and what you want as the output...
I have a timestamp field that is displayed in milliseconds that I need converting to human readable format to HH24:MIS
This is an example of what is stored in the field :79200000
Milliseconds since what? Epoch? Midnight? Jan. 1st?
Originally Posted by AcC8braman
Then it must be time data type, not the timestamp data type.
If convert miliseconds to time,
TIME('00:00:00') + (79200000 / 1000) SECONDS
Excellent, that worked a treat
I think the first one was used for an Oracle DB so that's why it wasn't working.
Thanks for your help peeps