getCurrentDateTime method

String getCurrentDateTime()

Implementation

String getCurrentDateTime() {
  DateTime now = DateTime.now();
  String formattedDateTime = DateFormat('yyyy-MM-dd HH:mm:ss').format(now);
  return formattedDateTime;
}