Re: Converting interval to integer
Posted in 1993
Converting from an interval to an integer isn't straight forward, but it's not difficult once you know how to do it: main define minutes interval minute(4) to minute define char_minutes char (20) define num_minutes smallint let minutes = extend (current, year to minute) - extend (today, year to minute) display minutes at 1,1 let char_minutes = minutes display char_minutes at 2,1 let num_minutes = char_minutes display num_minutes at 3,1 end main You can convert from an interval to a character string and from a character string to a number (so long as the value in the character string is numerical). This short program demonstrates how this can be accomplished. Hope this helps! +-------------------------------+----------------------------------------+ | 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 | +-------------------------------+----------------------------------------+