mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
push fetch devices and connecting the filters
This commit is contained in:
11
lib/utils/format_date_time.dart
Normal file
11
lib/utils/format_date_time.dart
Normal file
@ -0,0 +1,11 @@
|
||||
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)}';
|
||||
}
|
Reference in New Issue
Block a user