On 22-6-2013 01:42, Alan J Davies wrote: > Where do you declare "today"? > > This is an example: > select datediff( day, (select current_date from rdb$database), (select > current_date-10 from rdb$database)) > from rdb$database > gives an answer of -10 > so if you substitute this code: > > > datediff(day, (select current_date from rdb$database), > w_shipments.begin_fill_date) > > that will work if you have no other errors.
You can use current_date directly in a query, there is no need to select current_date from rdb$database, so this will work as well: select datediff(day, current_date, current_date-10) from rdb$database -- Mark Rotteveel ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
