This is a discussion on days between dates within the Informix forums, part of the Database Server Software category; --> GlacierI would like to select into a temp table the number of days between 2 dates, but that gives ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| GlacierI would like to select into a temp table the number of days between 2 dates, but that gives an INTERVAL type. Is there anyway to get that as an INT? (in IDS 7.31) I suppose one could use the month,day,year functions. Is that the only way? sending to informix-list |
| |||
| perhaps this sql could help: select date1 - date2 from table hth danny "Bill Hamilton" <bham@finsco.com> wrote in message news:bi5btn$1rj$1@terabinaries.xmission.com... > > GlacierI would like to select into a temp table the number of days between 2 > dates, > but that gives an INTERVAL type. > Is there anyway to get that as an INT? (in IDS 7.31) > > I suppose one could use the month,day,year functions. > Is that the only way? > > sending to informix-list |
| ||||
| On Fri, 22 Aug 2003 10:04:27 -0500, "Bill Hamilton" <bham@finsco.com> wrote: > >GlacierI would like to select into a temp table the number of days between 2 >dates, >but that gives an INTERVAL type. >Is there anyway to get that as an INT? (in IDS 7.31) > >I suppose one could use the month,day,year functions. >Is that the only way? > Strange . . . . . date1=9/9/03 date2=9/13/03 both are defined as date select (date2-date1) from jctmp1 returns: 4 those two dates that you mentioned . . . . are they datetime instead of date? |