I'm not clear on exactly what you're looking to do, but I think you want the strftime and strptime methods. See http://docs.python.org/lib/datetime-datetime.html
On Sun, Sep 7, 2008 at 11:24 AM, Wayne Watson <[EMAIL PROTECTED]>wrote: > I've been writing various functions with datetime to change date-time > formats from one to another. For example, my file names have a time stamp of > yyyymmdd_hhmmss in their names. When I need to convert, say, time by adding > seconds to the hhmmss part of the file name, I have a function that converts > hhmmss to hh:mm:ss, and another to go the other way. In between, I add > seconds. Maybe datetime can do this more easily without the use of my > functions? > -- > > Wayne Watson (Watson Adventures, Prop., Nevada City, CA) > > (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) > Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet > "If voting made any difference they wouldn't let us do it." > -- Mark Twain > > Web Page: <www.speckledwithstars.net/> > > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > >
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor