Re: INTERVAL and DATE data type
Posted in 1997
Topics: Data Types & Schema Design
Carlos Alves wrote: > > I want to store a value, the value give me how many time I gonna take to > do something. > > For example, 4 days and 3 hours. > > Can I keep the value in a INTERVAL? Yes, INTERVAL DAY TO HOUR. > If possible, how can I do arithmetic operations with a DATE value? As with any numeric value. The units are days. Eg. newdate = TODAY + 10 gives newdate equal to ten days time. Hope that helps, -- Mark. +------------------------------------------------------------------+ |Mark D. Stock - The West Solutions Group http://www.west.co.za | | The Informix FAQ is at http://www.iiug.org | |mailto:marks@west.co.za +-----------------------------------------+ |Tel: +27 11 803 2151 |If it doesn't work, force it! | |Fax: +27 11 803 2189 |If it breaks, it needed replacing anyway!| |Cell: +27 83 250 2325 |Well, that's how I code anyway! | +------------------------+-----------------------------------------+