Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python f-string format date

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

PREVIOUS NEXT
Code Example
Python :: get sheet names using pandas 
Python :: python RuntimeWarning: overflow encountered in long_scalars 
Python :: how to add images in hml while using flask 
Python :: get list input from user in python 
Python :: Change the user agent selenium 
Python :: how to print numbers from 1 to 20 in python 
Python :: divide two columns pandas 
Python :: display full dataframe pandas 
Python :: how to find if a value is even or odd in python 
Python :: get next multiple of a number 
Python :: how to find the calendar week python 
Python :: creating a 50 day and 100 day moving average python 
Python :: how to maker loops coun t in second in pytho 
Python :: python plot lines with dots 
Python :: fix ImportError: No module named PIL 
Python :: get current week python 
Python :: polynomial fit in python 
Python :: get highest value from dictionary python 
Python :: python datetime strptime hour minute second 
Python :: python import all words 
Python :: python months between two dates 
Python :: python how to unnest a nested list 
Python :: built in function in python 
Python :: python os output to variable 
Python :: figure title python 
Python :: rotate labels matplotlib 
Python :: increase contrast cv2 
Python :: stop a subprocess python 
Python :: django sum get 0 if none 
Python :: add rows to dataframe pandas 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =