date format
This commit is contained in:
parent
c0bbb0da2b
commit
48ae916f02
@ -10,6 +10,7 @@ import '../Models/Permission.dart';
|
||||
import '../Models/client.dart';
|
||||
import '../Models/produit.dart';
|
||||
import '../config/DatabaseConfig.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class AppDatabase {
|
||||
static final AppDatabase instance = AppDatabase._init();
|
||||
@ -749,7 +750,9 @@ class AppDatabase {
|
||||
final db = await database;
|
||||
final commandeMap = commande.toMap();
|
||||
final id = commandeMap.remove('id');
|
||||
|
||||
final date = DateTime.parse(commandeMap['dateCommande']);
|
||||
commandeMap['dateCommande'] = DateFormat('yyyy-MM-dd HH:mm:ss').format(date);
|
||||
|
||||
final setClause = commandeMap.keys.map((key) => '$key = ?').join(', ');
|
||||
final values = [...commandeMap.values, id];
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user