import datetime
t = datetime.datetime(2012, 2, 23, 0, 0)
t.strftime('%m/%d/%Y')
# Python program to demonstrate datetime object
# import datetime class
from datetime import datetime as date
# Getting current date and time
now = date.now()
string = date.isoformat(now)
print(string)
print(type(string))
# You can use Numpy's datetime_as_string function.
# The unit='D' argument specifies the precision, in this case days.
t = numpy.datetime64('2012-06-30T20:00:00.000000000-0400')
numpy.datetime_as_string(t, unit='D')