Hi,
I am trying to read date output from controller, but I am getting value in
View as decimal values:
controller Code:
rowslistPeriod = db((
(db.AM.resource_id==db.auth_user.id)&
(db.auth_user.id==auth.user.id)
).select(db.auth_user.first_name,db.db.Solution.solution_code,db.Activity.activity_name,
db.AM.effort, db.AM.activity_date)
return dict(recordlistPeriod=rowslistPeriod
View Code:
$(containerPreviousRecords).append('{{for x in recordlistPeriod:}}');
var ceffort= {{=x.AM.effort}};
var cDate= {{=x.AM.activity_date.strftime("%m/%d/%Y")}};
alert(cDate);
-----------------
Here I am able to get number value (effort), when I am getting alert
getting x.AM.activity_date.strftime("%m/%d/%Y") values as
decimal(0.0036789......) instead of Date.
Please help me to get date.
Thanks,
MC
--
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].
For more options, visit https://groups.google.com/d/optout.