print row.comment_date.strftime('%d/%m/%Y') On Monday, 9 December 2013 08:42:42 UTC-6, Simon Carr wrote: > > I have this line > > > comment_RS = self.db(self.db.aol_comments.aol_id == item.text(0)).select( > orderby=~self.db.aol_comments.comment_date) > > > > I want to format the date field like dd/mm/yyyy > i.e. > > for row in comment_RS: > print row.comment_date.day, "/", > row.comment_date.month,"/",row.comment_date.year > > I know the above is not going to work so how would I do this in Python? > > Thanks > Simon >
-- 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/groups/opt_out.