[Zope] dd/mm/yyyy date into MySQL

Tim Cook tim@freepm.org
Wed, 16 May 2001 06:43:24 -0500


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