1

I have a date say - 25-Jan-19

I want to convert it to - Jan19 in python. What date format I'll have to use to get this?

KReEd
  • 358
  • 4
  • 18

1 Answers1

1

If 25-Jan-19 is a string and will always be in this format, you can try this:-

date = date.split("-")
date = "".join(date[i] for i in range(1,len(date)))
Aaditya Joshi
  • 122
  • 10