Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python3 yyyymmddhhmmss

import datetime
 
currentDT = datetime.datetime.now()
 
print (currentDT.strftime("%Y-%m-%d %H:%M:%S"))
print (currentDT.strftime("%Y/%m/%d"))
print (currentDT.strftime("%H:%M:%S"))
print (currentDT.strftime("%I:%M:%S %p"))
print (currentDT.strftime("%a, %b %d, %Y"))
Comment

PREVIOUS NEXT
Code Example
Python :: how to make html files open in chrome using python 
Python :: how to check nth prime in python 
Python :: Get last “column” after .str.split() operation on column in pandas DataFrame 
Python :: find the first occurrence of item in a list in python 
Python :: python write file 
Python :: Getting the Current Working Directory in Python 
Python :: kaggle vs colab 
Python :: split list in half python 
Python :: python average 
Python :: what is join use for in python 
Python :: descending python dataframe df 
Python :: selenium get parent element python 
Python :: decision tree classifier 
Python :: how to underline text in tkinter 
Python :: python datetime weekday 
Python :: pyinstaller command 
Python :: check if part of list is in another list python 
Python :: how to add delay in python 
Python :: pandas filter every column not null 
Python :: open file python 
Python :: networkx largest component 
Python :: python naming conventions 
Python :: pandas read first column as index 
Python :: pass variable in subprocess run python 
Python :: python loop through array step size 2 
Python :: count values in numpy list python 
Python :: capitalise words in a column pandas 
Python :: how to print a specific value in a list python 
Python :: increase colorbar ticksize 
Python :: python download youtube video 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =