to_datetime#

geetools.DateAccessor.to_datetime()#

Convert a ee.Date to a datetime.datetime.

Returns:

The datetime.datetime representation of the ee.Date.

Return type:

datetime.datetime

Examples

import ee, geetools
from geetools.utils import initialize_documentation

initialize_documentation()

d = ee.Date('2020-01-01').geetools.to_datetime()
d.strftime('%Y-%m-%d')
'2020-01-01'