Aug 8, 2001 #1 specv Programmer Aug 8, 2001 42 CA Hi, I want to add ex : 10 days on a date and check with another date if the date + 10 days is < other date. How can I do this (add days) ? Thanks! Phil
Hi, I want to add ex : 10 days on a date and check with another date if the date + 10 days is < other date. How can I do this (add days) ? Thanks! Phil
Aug 8, 2001 #2 carp MIS Sep 16, 1999 2,622 US I think it depends on the RDBMS you are using. In Oracle, something like SELECT something FROM somewhere WHERE (some_date + 10) < comparison_date; would give you all of the rows where the date + 10 days is less than the comparison date. Upvote 0 Downvote
I think it depends on the RDBMS you are using. In Oracle, something like SELECT something FROM somewhere WHERE (some_date + 10) < comparison_date; would give you all of the rows where the date + 10 days is less than the comparison date.
Aug 9, 2001 #3 grega Programmer Feb 2, 2000 932 GB In Sybase (and probably MS SQL Server) you would use the dateadd function. Code: SELECT something FROM somewhere WHERE dateadd(dd, 10, some_date) < comparison_date Greg. Upvote 0 Downvote
In Sybase (and probably MS SQL Server) you would use the dateadd function. Code: SELECT something FROM somewhere WHERE dateadd(dd, 10, some_date) < comparison_date Greg.