[Zope] DateTime: Get DateTime-Objekt from german dateformat %d.%m.%Y

Patrick Ulmer ulmer at truckport.de
Thu Mar 3 06:16:17 EST 2005


>> i have a litte problem to insert my german dateformat into my
>> SQL-Database, because I must convert it to ISO-Format. I try
>>
>> datum=_.DateTime (wiedervorlage).ISO())
>>
>> but day and month ar interchanged.
>
> That's why it is called ISO format which is defined in the way you see it.


No. this is not the Problem. '1.3.2005' (D/M/Y) ist converted to
'2005-01-03' but for germany '2005-03-01' is correct.

>> How can I convert my datestring '1.3.2005' to '2005-03-01'?
>
> Look at the DateTime API -> somedate.strftime(formatstring)


I know this function but my problem is to get "somedate" from my german
formated (D/M/Y) datestring.

Thanks,
Patrick




More information about the Zope mailing list