Informix: Date-Time conversion -


i getting lost , nuts datetime in informix.i have 2 problems can hardly solve:

  1. i have datetime column (e.g. starttime) need convert int value, e.g. seconds of year or epoch, or whatever. found conversion utc, depends on timezone server runs, have no idea how specify conversion.... other hint, how convert seconds appreciated.
  2. i need calculate difference between 2 datetime-fields (e.g. endtime-starttime) , sum up. understanding result interval day(13) fraction(3). need convert sum once again seconds, cause need update other values result.

so, can me how convert within sql-statement different result-types?

cast int, example:

select  ((current + 5 units day - current)::interval second(9) second) ,((current + 5 units day - current)::interval second(9) second)::char(10)::int8 systables tabid=1 

Comments