WOOOW, you saved my life @Val K, a million thanks, that was curelessness on 
my part, sometimes one gets so tired you miss the obvious.
I modified the code to this & it works, thank you again.
import datetime
def index():
    exp_date=db(db.expiry_date_table).select()
    for exp_d in exp_date:
        current_date = request.now.date()- datetime.timedelta(days=0)
        if exp_d.expiry_date < current_date:
            redirect(URL('subscribe'))
    return locals()
Regards;

Mostwanted

On Monday, August 19, 2019 at 12:16:55 PM UTC+2, Val K wrote:
>
> There is no 'select' in your code. Is that a typo?

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/b62e728e-ec9e-4f92-9758-6429ed76c4d2%40googlegroups.com.

Reply via email to