Hi, why don't you just parse the returned string?
asdf = '3:04:02.994000' asdf = asdf.split(':') temp = asdf[-1].split('.') print asdf asdf.pop(-1) print asdf asdf.extend(temp) print asdf asdf = [int(i) for i in asdf] print asdf hrs,mins,secs,usecs = asdf That should work, and you can always transform this into some common unit, e.g. seconds etc. Hope it helps, Daniel 2011/7/17 C M <cmpyt...@gmail.com>: > This a time duration in my database: '3:04:02.994000' (i.e., 3 hrs, 4 > min, 2 sec and 994 microsec). It's a string. > > Is there a way to allow Matplotlib to interpret that directly as a > duration of time? > > Thank you. ------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users