I am newbie in Python and i m trying to do the following.
In PHP if we want to convert the date we use something like this:
$item_date = date("Y-m-j G:i:s", strtotime($RSSitem->pubDate));
Now, i m trying to do the same using Python, but i cant understand the exact method for doing it.
Can anyone help me by writing this line to python?
There are two parts:
datetime.strptime()function otherwise you could usedateutil.parser.parse()orfeeparser._parse_date()(the later might be easier to install)..strftime()method/time.strftime()function.See strftime() and strptime() behavior.