DateTime? transactionDate(String date) { // convert datetime to timestamp DateTime? timestamp = DateTime.tryParse(date); return timestamp; }