Converting unix timestamp string to readable date

前端 未结 15 2250
别跟我提以往
别跟我提以往 2020-11-22 04:30

I have a string representing a unix timestamp (i.e. \"1284101485\") in Python, and I\'d like to convert it to a readable date. When I use time.strftime, I get a

15条回答
  •  悲&欢浪女
    2020-11-22 05:01

    You can use easy_date to make it easy:

    import date_converter
    my_date_string = date_converter.timestamp_to_string(1284101485, "%B %d, %Y")
    

提交回复
热议问题