Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

str vs rper in python

import datetime
today = datetime.datetime.now()
  
# Prints readable format for date-time object
print (str(today)) #2016-02-22 19:32:04.078030
  
# prints the official format of date-time object
print (repr(today))  #datetime.datetime(2016, 2, 22, 19, 32, 4, 78030)


Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #str #rper #python
ADD COMMENT
Topic
Name
9+1 =