Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert timestamp datetime to int no astype

# example for year only. just lead with int. no astype needed.
int(pd.Timestamp.today().strftime('%Y'))
# 2022
 
PREVIOUS NEXT
Tagged: #convert #timestamp #datetime #int #astype
ADD COMMENT
Topic
Name
1+1 =