I\'m using pickadate.js which returns the date in this format:
8 March, 2017
I would like to convert this to the dateti
Mark Reed's advice might be best in your case. One frequently overlooked alternative for dates is the arrow module, which offers some interesting features. In this case you can do:
>>> import arrow
>>> arrow.get('8 March, 2017', 'D MMMM, YYYY').format('YYYY-MM-DD')
'2017-03-08'
As an example of a feature, if you capture that date you could format it in Russian.
>>> aDate = arrow.get('8 March, 2017', 'D MMMM, YYYY')
>>> aDate.format('YYYY MMMM DD', locale='ru')
'2017 марта 08'