how we convert string to year,month,day in dart code example Example: dart convert string to datetime var dateTime = DateTime.parse("dateTimeString");