DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python f-string format date
import
datetime now
=
datetime
.
datetime
.
now
(
)
print
(
f'
{
now
:
%
Y
-
%
m
-
%
d
%
H
:
%M
}
'
)
Source by zetcode.com #
PREVIOUS
NEXT
Tagged:
#python
#format
#date
ADD COMMENT
Topic
COMMENT
Name
3+5 =
Submit