On Wed, 2007-31-01 at 12:17 -0500, Guy Hulbert wrote:
> > I would like to display my dates with format '%d/%m/%Y'  instead of
> ISO 
> > format.
> > 
> > qry = session.query(Nazione).select(Nazione.c.codice=='201')
> > qry[0].data_inizio
> > print qry[0].data_inizio
> > 2006-01-14
> > 
> > 
> > Is there a way to set it in SA without using a customer function  ?
> 
> Something like:
> 
> '/'.join(s.split('-').reverse())
> 
> where 's' is the string you want to reformat, would do it.

 s = '2006-01-14'
 l = s.split('-')
 s = '/'.join(l)

does work (I haven't been using python long enough to get it into a
line :-( ... i'll shut up now ...

-- 
--gh



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to