Hi all,

I would like to create a python customer function to extract data from a
table column and return a calculated value as in:

def birth(data):
          mm =
dict(A='01',B='02',C='03',D='04',E='05',H='06',L='07',M='08',P='09',R='10',S='11',T='12')
          return '19'+data[6:8] +'-'+ mm[data[8:9]] +'-'+ data[9:11]



sa.func.to_date( birth(Anagrafica.c.dato_fiscale), 'YYYY-mm-dd'))



in: Anagrafica.c.dato_fiscale='ZZZHHH54M11Z128Y'
out: '1954-08-11'

How can I do this in a sqlalchemy query?

thanks for any help.
j

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to