<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thank you Andrew.<span class="moz-smiley-s1"><span> :-) </span></span><br>
<br>
But it give me another an error<span class="moz-smiley-s2"><span> :-( </span></span><br>
<br>
<strong>Error Value: You are not allowed to access strftime in this
context<br>
<br>
Regards</strong><br>
<br>
<br>
Andrew Milton wrote:
<blockquote cite="mid20050114000000.GW98558@camelot.theinternet.com.au"
 type="cite">
  <pre wrap="">+-------[ Zorze ]----------------------
| Hi,
| I'am new to Zope so please excuse me about some stupid questions.

| How can I format a date field from in a DTML from ZSQL Method e.i.:

| It shows 2005-01-12 22:49:33:00

| but I want to show just 2005-01-12


Try these;

&lt;dtml-var "theDate.strftime('%Y-%m-%d')"&gt;

or

&lt;dtml-var "theDate.strftime('%F')"&gt; (same as above, just shorter).

| or  change de order of the date 
| :01-12-2005.

&lt;dtml-var "theDate.strftime('%d-%m-%Y')"&gt;

  </pre>
</blockquote>
<br>
</body>
</html>