close
不知道為什麼中文這麼難找資源OAo
>>>import datetime
>>>import time
>>>endDate='2017/12/6'
>>> time_format=datetime.datetime.strptime(endDate,'%Y/%m/%d').strftime("%B %#d, %Y")
>>> time_format
'December 6, 2017'
參考文章https://stackoverflow.com/questions/904928/python-strftime-date-without-leading-0
全站熱搜
留言列表