i need to cast a INTERVAL Day to Second(2) attribute to either int or char. Anyone have an example. I cannot find one in the ref manuals.
Cast to char is easy: cast(interval '123 12:34:56.78' day to second as char(17))
But what result do you want for a cast to int?
012312345678? Or the number of seconds like 10672496.21?
Tanks Dieter, but some clarification. I want to change an existing column (Elapsedtime) which is Interval day to second(2) into another form that I can use for grouping like how many < 1min, < 3min,,ect
This statement gives me invaild operation for date or time interval
select cast( ElapsedTime as integer) or
select cast( ElapsedTime as char(17))