Instead of:

form3 = SQLFORM.factory(Field('ddate','date', label='Enter a date')).process()
if form3.accepted:
        k=form3.vars.ddate.day()
        redirect(URL('readings', 'check', args=[k,k,k]))

Do:

form3 = SQLFORM.factory(Field('ddate','date', label='Enter a date')).process()
if form3.accepted:
        print form3.vars.ddate
        k=form3.vars.ddate.day()
        print k
        redirect(URL('readings', 'check', args=[k,k,k]))


And see what is shown in your shell

2016-11-28 12:24 GMT-05:00 Mike Stephenson <raghib....@iiits.in>:
> I am not getting the day of the month
>
> On Monday, November 28, 2016 at 10:47:13 PM UTC+5:30, Yoel Benitez Fonseca
> wrote:
>>
>> and what value are u getting on 'k', the day of month i suppose !?
>>
>> 2016-11-28 9:56 GMT-05:00 Mike Stephenson <raghi...@iiits.in>:
>> > form3 = SQLFORM.factory(Field('ddate','date', label='Enter a
>> > date')).process()
>> > if form3.accepted:
>> >         k=form3.vars.ddate.day()
>> >         redirect(URL('readings', 'check', args=[k,k,k]))
>> >
>> > K doesn't read value as expected.
>> >
>> > --
>> > 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+un...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Yoel Benítez Fonseca
>> http://redevil.cubava.cu/
>> $ python -c "import this"
>
> --
> 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.



-- 
Yoel Benítez Fonseca
http://redevil.cubava.cu/
$ python -c "import this"

-- 
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.

Reply via email to