The simplest way to convert from 30th Sep 2018 or Mon 30th Sep 2018 to 2018-09-30 00:00:00 is using dateutil.parser, i.e.:
from dateutil.parser import parse
d = "30th Sep 2018"
dd = "Mon 30th Sep 2018"
print parse(d)
print parse(dd)
# 2018-09-30 00:00:00
# 2018-09-30 00:00:00
For the opposite conversion, there's datetime.strptime, but I'm afraid it doesn't output ordinals (1st, 2nd) as you want, still, you can achieve the desired result using a small function, i.e.:
def ord(n):
    return str(n)+("th" if 4<=n%100<=20 else {1:"st",2:"nd",3:"rd"}.get(n%10, "th"))
x = datetime.datetime.strptime("2018-09-30 00:00:00", '%Y-%m-%d %H:%M:%S')
print "{} {}".format(ord(int(x.strftime('%d'))), x.strftime('%b %Y'))
# 30th Sep 2018