Hi Richard the trigger is T2.completed_date+T1.with_holding = T2.withhold_until
I am reasonably new to web2py, can get though most things, but this has me. cheers Anthony S On Sunday, 1 February 2015 18:42:34 UTC+11, Richard D wrote: > > Anthony S > > What is the trigger for this update of T2 withholding _until? This will > influence the solution drastically. > > Richard D > > On Saturday, January 31, 2015 at 8:47:47 PM UTC+1, Anthony Smith wrote: >> >> Hi >> >> I never explained it very well, >> Table 1 has products with a with-holding period in days eg. product1 10 >> days, product2 7 7days etc >> Table2 has when, where, completed_date the product was used, it also has >> a withholding_until date field >> >> I am trying to get the T2 withholding _until to be update using the >> T2completed_date+ T1with-holding period >> >> On Sunday, 1 February 2015 02:41:02 UTC+11, Massimo Di Pierro wrote: >>> >>> I do not understand the context of your question. In python you can do: >>> >>> d = datetime.datetime(2015,1,29,11,30,00) >>> d = d + datetime.timedelta(days = 7) >>> >>> If a date is in a database you can do the same, you select, add and >>> store it again. Some databases allow you to do it at the SQL level but not >>> all, so the DAL does not support this. >>> >>> Or is your question about the web2py built-in scheduler? >>> >>> >>> >>> On Saturday, 31 January 2015 04:18:16 UTC-6, Anthony Smith wrote: >>>> >>>> Hi, >>>> I am unable to find any information on adding the number of days to a >>>> date. >>>> >>>> The number of days is stored in a table as a int >>>> >>>> Second it where a task is created and a expiry is require using the >>>> completed date of the task + the number of days from the first table. >>>> >>>> What is the best way to handle this? >>>> >>>> thanks >>>> >>>> >>>> >>>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.