Pythonで現在日時を取得したいとき 2021年8月11日 / 1 min read View more blogs with the tag python Table of Contents #はじめに #方法 はじめに Pythonで現在日時を取得する方法です。 方法 00.123456import datetime dt_now = datetime.datetime.now()dt_now.strftime('%Y年%m月%d日 %H:%M:%S')# 2021年08月01日 10:00:00