mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 14:47:23 +00:00
12 lines
324 B
Dart
12 lines
324 B
Dart
import 'package:intl/intl.dart';
|
|
|
|
String formatDateTime(DateTime? dateTime) {
|
|
if (dateTime == null) {
|
|
return '-';
|
|
}
|
|
final DateFormat dateFormatter = DateFormat('dd/MM/yyyy');
|
|
final DateFormat timeFormatter = DateFormat('HH:mm');
|
|
|
|
return '${dateFormatter.format(dateTime)} ${timeFormatter.format(dateTime)}';
|
|
}
|