Re: How to parse timestamps containing milliseconds

2006-06-28 Thread skip
Chris> I'm trying to read a file containing timestamps with milliseconds Chris> ("2006/3/18 8:20:34.050") When I try to parse I get an error Chris> about the trailing ".050". Chris> How should I approach this? Here's the bad hack I use... def timeparse(t, format):

How to parse timestamps containing milliseconds

2006-06-25 Thread Christopher Helck
Hi,I'm trying to read a file containing timestamps with milliseconds ("2006/3/18 8:20:34.050"). The DateTime object seems to take milliseconds (microseconds really) but the strftime method doesn't have a format code for the millisecond field (in other languages I've used %s.). When I try to parse I