On 06/28/2014 04:35 PM, Mark Lawrence wrote:
On 28/06/2014 19:39, Alan Gauld wrote:
On 28/06/14 18:59, Ken G. wrote:
BTW You say you get it from "database on file".
Now if that is a real database such as SQLite you will find functions
there to convert it to julian at source... which is easier
On 28/06/2014 19:39, Alan Gauld wrote:
On 28/06/14 18:59, Ken G. wrote:
BTW You say you get it from "database on file".
Now if that is a real database such as SQLite you will find functions
there to convert it to julian at source... which is easier than reading
it as a string, parsing it, and th
On 06/28/2014 02:39 PM, Alan Gauld wrote:
On 28/06/14 18:59, Ken G. wrote:
datecode = "20140101" # from database on file
month = datecode[4:6]
day = datecode[6:8]
year = datecode[0:4]
use strptime() to parse dates, its much more reliable.
datecode = year + "-" + month + "-" + day
today
On 06/28/2014 02:36 PM, Steven D'Aprano wrote:
On Sat, Jun 28, 2014 at 01:59:04PM -0400, Ken G. wrote:
I know the correct answer should be 001, but I keep getting 179 which is
the correct answer for June 28, 2014 (I think).
Day 179 of 2014 is June 28 according to my diary, which happens to be
On 06/28/2014 02:20 PM, Albert-Jan Roskam wrote:
From: Ken G.
To: tutor@python.org
Sent: Saturday, June 28, 2014 7:59 PM
Subject: [Tutor] Finding numeric day in a year...
I know the correct answer should be 001, but I keep getting 179 which is the
correct an
On 28/06/14 18:59, Ken G. wrote:
datecode = "20140101" # from database on file
month = datecode[4:6]
day = datecode[6:8]
year = datecode[0:4]
use strptime() to parse dates, its much more reliable.
datecode = year + "-" + month + "-" + day
today = datecode
And use strftime() to format th
On Sat, Jun 28, 2014 at 01:59:04PM -0400, Ken G. wrote:
> I know the correct answer should be 001, but I keep getting 179 which is
> the correct answer for June 28, 2014 (I think).
Day 179 of 2014 is June 28 according to my diary, which happens to be
today. (Well, I'm in Australia, so for me it
On 06/28/2014 02:13 PM, Mark Lawrence wrote:
On 28/06/2014 18:59, Ken G. wrote:
I know the correct answer should be 001, but I keep getting 179 which is
the correct answer for June 28, 2014 (I think). I tried using datecode
in various places instead of today but I am still getting 179. Currentl
>
> From: Ken G.
>To: tutor@python.org
>Sent: Saturday, June 28, 2014 7:59 PM
>Subject: [Tutor] Finding numeric day in a year...
>
>
>
>I know the correct answer should be 001, but I keep getting 179 which is the
>correct answer for June 28, 2014 (I think). I tr
On 28/06/2014 18:59, Ken G. wrote:
I know the correct answer should be 001, but I keep getting 179 which is
the correct answer for June 28, 2014 (I think). I tried using datecode
in various places instead of today but I am still getting 179. Currently
using Ubuntu 12.04.4 and Python 2.7. Thanks f
I know the correct answer should be 001, but I keep getting 179 which is
the correct answer for June 28, 2014 (I think). I tried using datecode
in various places instead of today but I am still getting 179. Currently
using Ubuntu 12.04.4 and Python 2.7. Thanks for any feedback and suggestion.
11 matches
Mail list logo