python f-string format date

36

python f-string format date -

import datetime
now = datetime.datetime.now()
print(f'{now:%Y-%m-%d %H:%M}')

Comments

Submit
0 Comments