次のコードをPythonでどのように印刷できますか?Pythonでdatetime出力をフォーマットする
2017年10月13日(水曜日)12時30分
でこれは私が現時点で持っているものです。
import datetime
import time;
localtime = time.localtime(time.time())
now = datetime.datetime.now()
subject = 'Your scanning result of '+datetime.date.today().strftime("%A, %d %B %Y at "), (now.hour, now.minute)
print (subject)
出力:
('Your scanning result of Wednesday, 13 September 2017 at ', (12, 31))
私は時間の部分にこだわっています。
注:私はPythonの初心者です。
ありがとうございます。
[python datetime](https://docs.python.org/2/library/datetime.html)の詳細を読む –
Commenters、私は日時計はここで問題ではないと思います。 –
'subject = 'あなたのスキャン結果+ datetime.date.today()。strftime("%A、%d%B%Y ")+' {}:{} '。フォーマット(now.hour、now 。分) ' – Igle