extracting day-month-year from a pre-epoch DateTime instance?
15 Feb
2000
15 Feb
'00
1:17 p.m.
I have pre-epoch DateTime instance dates that I want to render a la <dtml-var birthdate fmt="%d %a %Y"> Obviously this doesn't work so I'm toying with <dtml-let numdays="_.int(birthdate-_.DateTime('01/01/1901'))"> [...] </dtml-let> where I need to compute the integer year, month and day corresponding to numdays (since 01 jan 1901). Seeing that human history didn't begin in 1970, this has got to be a common enough problem that either (i) there's a trick such that birthdate.strftime() actually does work or (ii) I'm missing something obvious. I bet on the latter as there is seemingly no mention of this on eGroups or the python FAQ ... Cheers, Darran.
9548
Age (days ago)
9548
Last active (days ago)
0 comments
1 participants
participants (1)
-
Darran Edmundson