Get day of year from python arrow -


_date = '2017-03-17t00:00:00'  import arrow arrow.get(_date) 

how can day of year above code?

you asking arrow solution, here alternative datetime library.

as explained by: converting python time stamp day of year answer seeking:

import datetime _date = '2017-03-17t00:00:00' dt = datetime.datetime.strptime(_date, '%y-%m-%dt%h:%m:%s') print(dt.timetuple().tm_yday) # prints 76 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -