# import the datetime module
import datetime
# datetime in string format for may 25 1999
input = '2021/05/25'
# format
format = '%Y/%m/%d'
# convert from string format to datetime format
datetime = datetime.datetime.strptime(input, format)
# get the date from the datetime using date()
# function
print(datetime.date())
from dateutil.parser import parse
parse('31, March 31, 2010, 10:51pm')
var dateString = "2020-09-25T10:13:21.246321+01:00";
String formattedDateString = DateFormat('do LLLL yyyy').format(DateTime.parse(dateString));
// formattedDateString - OUTPUT: "25 September 2020"