[Zope] input a date in european style, get it saved as type date
(Was: How do I get the first ten characters of a string?)
Lars Heber
Lars.Heber@t-systems.de
Fri, 23 Feb 2001 20:16:30 +0100
Loren Stafford schrieb:
> The date is a complex object not a string. Zope provides many ways to format
> it. Here is one:
>
> <dtml-var "ZopeTime()" fmt=%Y/%m/%d>
I like this fmt thing...
I tried a few things.
My actual problem now is:
I've got a form, which returns a date string in the form dd.mm.YYYY via REQUEST.
some piece of code, still in use:
<dtml-with "NewsItem.createInObjectManager(REQUEST['id'], REQUEST)">
<dtml-call "propertysheets.Attribute.manage_editProperties(REQUEST)">
Before this last line I have to change my dd.mm.YYYY into Zope's YYYY/mm/dd.
i. e. s. th. like
<dtml-call "REQUEST.set('datum',?????)">
Of course I could do this by parsing the string and puzzling it newly together,
but I think there must be a more elegant to do it, isn't it?
I tried to use this fmt thing - didn't of course work because it is for the var
tag.
I also tried s. th. like
<dtml-let datum="Verfallsdatum" fmt="...">
Didn't work either - of course, I know it can't.
But I don't know how to do my task.
I looked around in the How To's etc. but didn't find anything.
Perhaps you could help me a last time for today.
Have a nice weekend.
Lars