static String formatDateTimeString(DateTime date) { var formater = DateFormat('yyyy-MM-dd HH:mm:ss'); var year = formater.format(date); return year; }