Re: substracting two different "DATE" values?
Posted in 1996
In article <4qgqlg$cfe@newsbf02.news.aol.com>, Frank660 <frank660@aol.com> wrote: >Perhaps it would help if you could explain a little about why you are >trying to do this. Informix will allow you to subtract two dates simply by >using the minus (-) sign. This may not be what you want though. It goes >something like: > >LET g_date1 = g_newdate - g_olddate ^^^^^^^ This should be an *integer* (or a day-time INTERVAL), not a date. >What you'll get though (I think) is the date 12/31/1899 offset by the >number of days between the two dates and that's probably not what you >want. So if there were two days between g_newdate and g_olddate I think >you'd get 1/2/1900. If you used a INTEGER variable in place of g_date1, I >think you would simply get the number 2. No, you'd get the difference: 2. -- Alan Denney aland@informix.com "Eventually people realized that the Information Superhighway was essentially CB radio, but with more typing." -- Dave Barry