python中时间戳转时间

版权声明:本文为博主原创文章,未经博主允许可以转载。 https://blog.csdn.net/helloexp/article/details/82387847

一、导入对应包,先获取一个时间戳

二、通过指定的时间戳,生成对应的时间元组

 三、将生成的时间元组传入格式化字符串,进行时间格式化

 

上述两种时间格式方法,任选其一即可

猜你喜欢

转载自blog.csdn.net/helloexp/article/details/82387847