prettydate() does this:

 try:
     dt = datetime.datetime.now() - d
 except:
     return ''

In the view, maybe try:

{{import datetime}}
{{=datetime.datetime.now() - row.timestamp}}

and see what error is generated to help figure out the problem.

Anthony

On Monday, August 13, 2012 5:11:00 PM UTC-4, Pystar wrote:
>
> Hi guys, 
> I am storing my timestamp in my database using the datetime.datetime.now() 
> directive. And on display I want to use prettydate in my views, 
> I am doing this in my views {{=prettydate(row.timestamp, T)}} but it fails 
> silently by not displaying anything. I have tried it in the web2py shell 
> and it works but doesnt work in my views, 
> what am I doing wrong?
> Need replies ASAP
>

-- 



Reply via email to