Re: Interval Manipulation
Posted in 1993
Kevin,
Turning time intervals into datetime year to minute formats is a little
tricky because you probably won't get the answer you want. The problem is
that the date portion of your datetime must have a valid value... If you
don't mind having a default date of some sort attached to your datetime
result, the following will work:
select d1, d2, d1 - d2, extend(date("1/1/0") + (d1 - d2), year to minute)
order by 4
You can set date("1/1/0") in the extend function to anything you want, but
your number of minutes will always be the result of your extend function minus
whatever date you choose to use.
Hope this is of some use!
Cathy
+-------------------------------+----------------------------------------+
| Cathy Kipp | Internet: ckipp@vth1.vth.colostate.edu |
| Veterinary Teaching Hospital | |
| Colorado State University | Voice: (303) 491-1294 |
| Fort Collins, CO 80523 | Fax: (303) 491-1205 |
+-------------------------------+----------------------------------------+