dear annet, you can use strftime if the type of fromdate and todate is datetime.
fromdate.strftime("%B %d, %Y) sincerely Mengu On Nov 4, 12:15 pm, annet <annet.verm...@gmail.com> wrote: > In one of my functions I have: > > response.flash='Club(s) in ' + request.vars.plaats > > I also have functions in which the vars are of type date. I tried: > > response.flash='Event(s) van ' + str(fromdate) + ' tot ' + str(todate) > > ... but that results in dates that aren't formatted correctly. In my > views I have got: > > <td> > {{=db.event.van_datum.formatter(event.event.van_datum)}} > </td> > > ... to format the date correctly. Is there an equivalent of this code > to format the date in the function? > > Kind regards, > > Annet. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---