Mike asked:

> I have a date string (ie dd/mm/yy) which I'm drawing out of a database
> (ODBC connection to Access) with a Z SQL method and I need to use that
> data to set the initial condition of a set of 3 select items (ie day,
> month and year).  Is there a way to split this date (it'll come out
> looking like dd/mm/yy) to get the components of it 

You could use the Python "string slice" syntax, like so:

<dtml-let day_of_month="_['start_date'][:2]"
The <dtml-var day_of_month> day,<br>
of the <dtml-var month_of_year> month,<br>
of the year 20<dtml-var month_of_century><br>

Jerry S.

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to