[Zope] Date format question urgent!!!

Marcel Preda marcel@punto.it
Thu, 27 Jul 2000 11:33:47 +0200 (CEST)


On Thu, 27 Jul 2000, Marko MARKOVIC wrote:

> hi all,
> 
> i have a few questions about date formating:
> 
I'll skip this, were a lot of threads about DateTime format (fmt)
Other time..

> 
> 
> Finally, i want formatting a date as 2000/01/01 and then put in my table with a sql method.
> 
> Any suggestions or a good example will be apprecieated...                        
> 

<dtml-let tert="'01.01.1900'">
<dtml-let myTime="ZopeTime(tert)">
<dtml-let yourDate= "'%s/%s/%s' % (myTime.year(), myTime.mm(),
myTime.dd())">
do something here ...
</dtml-let>
</dtml-let>
</dtml-let>


But
<dtml-let yourDate= "'%s/%s/%s' %(tert[6:], tert[3:5],tert[:2])">

must be faster, if you have the date in the format:
dd.mm.yyyy
otherway ...


> 
> 
> $Regards
> 
> MM
> 

PM