--On Samstag, 9. November 2002 10:36 +0100 Steffen Hausmann <steffen@hausmann-family.de> wrote:
On Sun, Nov 03, 2002 at 12:02:49AM +0100, Dieter Maurer wrote:
McDonnell, Larry writes:
How do I convert an input date string "10/22/02" to "2002/10/22" in a date format? You split it at "/" and rearrange the peaces: month,day,year= datestring.split('/') return '20%02d/%02d/%02d' % (year,month,day)
I had a similar problem and your post helped me a lot.
But if I try to output my date (e.g. '2002/12/15 12:45:00') with
<dtml-var dateStart fmt="%d.%m.%Y"> <dtml-var dateStart fmt="%H:%M">
This works only if dateStarty is an instance of DateTime but not a *string* containing a date representation. You should use instead: <dtml-var "_.DateTime('2002/12/15')" fmt="%d.%m.%y" > -aj