8 Oct
2004
8 Oct
'04
6:34 a.m.
Hey Holger! Wrong language or wrong list ;-) Holger Butschek wrote:
Wie wandele ich eine Zahl in ein datum um. Ich möchte eine Übersichtsseite für eGroupware auf meinem Zope-Server bereitstellen. In der MySQL liegt das Datum in einem int(11)-Feld gespeichert. Ein Beispiel 1095780422. Wie kann ich hieraus ein Datum ermitteln?
Viele Grüße, Holger
Just use that int value to create an DateTime-Object: t = DateTime(1095780422) Then you can format the output of your date with strftime, e.g.: timestring = t.strftime('%Y-%m-%d') Just take a look at the DateTime-API in the Zope help. HTH Wolfram