TIMESTAMP INTERVAL 15 MIN

UDA

TIMESTAMP INTERVAL 15 MIN

The value for the field TIME_INTERVAL_15_MIN is calculated as below and stored in a VARCHAR column
TIME_INTERVAL_15_MIN= (GMT_TIME,'hh24') *4 + floor(to_char(GMT_TIME,'mi') / 15) + 1
Example:
TIME_INTERVAL_15_MIN= (07:40:42,'hh24') *4 + floor(to_char(07:40:42,'mi') / 15) + 1
= 7*4+floor(40/15) +1 = 28+2+1=31

Requirement:
To convert that TIME_INTERVAL_15_MIN (31 in the above example) back to Hour and Minutes and then concatenate with a DATE field and store in TD as TIMESTAMP(0)

Are there Any functions available in TD to do the same?

TIA
2 REPLIES
Enthusiast

Re: TIMESTAMP INTERVAL 15 MIN

You can convert the time interval 15 min to HH:MI:SS but you can never get the exact time since ceil and floor functions. But if required, u can derive the upper or lower quarter hour from the time interval 15 min val.
Enthusiast

Re: TIMESTAMP INTERVAL 15 MIN

You can convert the time interval 15 min to HH:MI:SS but you can never get the exact time since ceil and floor functions. But if required, u can derive the upper or lower quarter hour from the time interval 15 min val.