Extract day of year and Julian day from a string date

First, you can convert it to a datetime.datetime object like this: >>> import datetime >>> fmt=”%Y.%m.%d” >>> s=”2012.11.07″ >>> dt = datetime.datetime.strptime(s, fmt) >>> dt datetime.datetime(2012, 11, 7, 0, 0) Then you can use the methods on datetime to get what you want… except that datetime doesn’t have the function you want directly, so you … Read more

Why does NSDateFormatter return nil date for these 4 time zones?

I have a suspicion. Only a suspicion, but a pretty strong one. That value represents October 19th 2064. The Brazilian time zones observe daylight saving time starting at local midnight – that’s when their clocks go forward, so midnight itself doesn’t exist. October 19th is one of those transitions. Here’s some sample code using Noda … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)