Re: calculate difference between two timestamps [newbie]

2011-12-18 Thread nukeymusic
On 18 dec, 13:58, Lie Ryan wrote: > On 12/18/2011 10:43 PM, Peter Otten wrote: > > > > > > > > > > > nukeymusic wrote: > > >> On 17 dec, 12:20, "Günther Dietrich"  wrote: > >>> nukeymusic  wrote: > I'm trying to calculate the difference in seconds between two > > >>> [...] > > >> import d

Re: calculate difference between two timestamps [newbie]

2011-12-18 Thread nukeymusic
On 18 dec, 16:01, Peter Otten <[email protected]> wrote: > nukeymusic wrote: > > thanks and also thanks to all the others who were so kind to help me > > out with my first python-script. > > I tested your alternatives and they work, the only a minor > > inconvenience is that the first line of the in

Re: calculate difference between two timestamps [newbie]

2011-12-18 Thread Peter Otten
nukeymusic wrote: > thanks and also thanks to all the others who were so kind to help me > out with my first python-script. > I tested your alternatives and they work, the only a minor > inconvenience is that the first line of the inputfile gets lost i.e. > the first timestamp should become zero (

Re: calculate difference between two timestamps [newbie]

2011-12-18 Thread nukeymusic
On 18 dec, 13:58, Lie Ryan wrote: > On 12/18/2011 10:43 PM, Peter Otten wrote: > > > > > > > > > > > nukeymusic wrote: > > >> On 17 dec, 12:20, "Günther Dietrich"  wrote: > >>> nukeymusic  wrote: > I'm trying to calculate the difference in seconds between two > > >>> [...] > > >> import d

Re: calculate difference between two timestamps [newbie]

2011-12-18 Thread Lie Ryan
On 12/18/2011 10:43 PM, Peter Otten wrote: nukeymusic wrote: On 17 dec, 12:20, "Günther Dietrich" wrote: nukeymusic wrote: I'm trying to calculate the difference in seconds between two [...] import datetime date1 = datetime.datetime.strptime("Dec-13-09:47:12", "%b-%d-%H:%M:%S") date2 =

Re: calculate difference between two timestamps [newbie]

2011-12-18 Thread Peter Otten
nukeymusic wrote: > On 17 dec, 12:20, "Günther Dietrich" wrote: >> nukeymusic wrote: >> >I'm trying to calculate the difference in seconds between two >> >> [...] >> >> >>> import datetime >> >>> date1 = datetime.datetime.strptime("Dec-13-09:47:12", >> >>> "%b-%d-%H:%M:%S") date2 = >> >>> dateti

Re: calculate difference between two timestamps [newbie]

2011-12-18 Thread nukeymusic
On 17 dec, 12:20, "Günther Dietrich" wrote: > nukeymusic wrote: > >I'm trying to calculate the difference in seconds between two > > [...] > > >>> import datetime > >>> date1 = datetime.datetime.strptime("Dec-13-09:47:12", "%b-%d-%H:%M:%S") > >>> date2 = datetime.datetime.strptime("Dec-13-09:47:3

Re: calculate difference between two timestamps [newbie]

2011-12-17 Thread Günther Dietrich
nukeymusic wrote: >I'm trying to calculate the difference in seconds between two [...] >>> import datetime >>> date1 = datetime.datetime.strptime("Dec-13-09:47:12", "%b-%d-%H:%M:%S") >>> date2 = datetime.datetime.strptime("Dec-13-09:47:39", "%b-%d-%H:%M:%S") >>> delta = date2 - date1 >>> delta_

Re: calculate difference between two timestamps [newbie]

2011-12-17 Thread Vince
On Sat, Dec 17, 2011 at 02:19:44AM -0800, nukeymusic wrote: > I'm trying to calculate the difference in seconds between two > timestamps, but I'm totally stuck: > date1="Dec-13-09:47:12" > date2="Dec-13-09:47:39" > >>> diff=datetime.date(date2)-datetime.date(date1) > Traceback (most recent call las

Re: calculate difference between two timestamps [newbie]

2011-12-17 Thread Vincent Vande Vyvre
Le 17/12/11 11:19, nukeymusic a écrit : I'm trying to calculate the difference in seconds between two timestamps, but I'm totally stuck: date1="Dec-13-09:47:12" date2="Dec-13-09:47:39" diff=datetime.date(date2)-datetime.date(date1)

Re: calculate difference between two timestamps [newbie]

2011-12-17 Thread Dave Angel
On 12/17/2011 05:19 AM, nukeymusic wrote: I'm trying to calculate the difference in seconds between two timestamps, but I'm totally stuck: date1="Dec-13-09:47:12" date2="Dec-13-09:47:39" diff=datetime.date(date2)-datetime.date(date1) Traceback (most recent call last): File "", line 1, in Typ

calculate difference between two timestamps [newbie]

2011-12-17 Thread nukeymusic
I'm trying to calculate the difference in seconds between two timestamps, but I'm totally stuck: date1="Dec-13-09:47:12" date2="Dec-13-09:47:39" >>> diff=datetime.date(date2)-datetime.date(date1) Traceback (most recent call last): File "", line 1, in TypeError: an integer is required struct_dat