Hi, What would be the best way to take a date in the format 'dd/mm/yyyy' from a form and insert it into a date field in a MySQL table, which takes the format yyyy/mm/dd? I could have seperate fields for day, month and year and piece them together before inserting them in the table. But, is it possible to take a complete date, and change it format before inserting it in a MySQL table? Having looked at the Zope Book nothing obvious jumped out. Regards, Sion -- Computer Support Sion Morris School of Psychology Ysgol Seicoleg University of Wales, Bangor Prifysgol Cymru Bangor Tel: 01248 382469 Fax: 01248 382599
I know this has come up a few times before but has anyone found a (working) solution to getting Zope to write out different logs for different site roots and virtual hosts? There was a snippet of code posted back in the archives but when I tried it it did not work. I am using Zope 2.3.2 straight (no Apache). Thanks, BZ
Sion Morris wrote:
Hi,
What would be the best way to take a date in the format 'dd/mm/yyyy' from a form and insert it into a date field in a MySQL table, which takes the format yyyy/mm/dd?
I could have seperate fields for day, month and year and piece them together before inserting them in the table. But, is it possible to take a complete date, and change it format before inserting it in a MySQL table?
<dtml-var expr="my_date_object.strftime('%Y/%m/%d')"> HTH, -- Tim Cook, President - FreePM,Inc. http://www.FreePM.com Office: (731) 884-4126 ONLINE DEMO: http://www.freepm.org:8080/FreePM
On Wednesday 16 May 2001 13:43, Tim Cook wrote:
Sion Morris wrote:
Hi,
What would be the best way to take a date in the format 'dd/mm/yyyy' from a form and insert it into a date field in a MySQL table, which takes the format yyyy/mm/dd?
I could have seperate fields for day, month and year and piece them together before inserting them in the table. But, is it possible to take a complete date, and change it format before inserting it in a MySQL table?
<dtml-var expr="my_date_object.strftime('%Y/%m/%d')">
HTH,
Can you do this in a REQUEST.set or something ? Because you need to change the content of the variable before inserting it into a database ... Gitte
participants (4)
-
BZ -
Gitte Wange -
Sion Morris -
Tim Cook