Question : flutter get current date
Answered by : aashit-vyom
import 'package:intl/intl.dart';
main() { static final DateTime now = DateTime.now(); static final DateFormat formatter = DateFormat('yyyy-MM-dd'); final String formatted = formatter.format(now); print(formatted); // something like 2013-04-20
}
// https://pub.dev/documentation/intl/latest/intl/DateFormat-class.html
Source : https://stackoverflow.com/questions/16126579/how-do-i-format-a-date-with-dart | Last Update : Sat, 18 Jul 20
Question : how to display current date time in flutter
Answered by : thankful-tapir
main() { var now = new DateTime.now(); var formatter = new DateFormat('yyyy-MM-dd'); String formattedDate = formatter.format(now); print(formattedDate); // 2016-01-25
}
Source : https://stackoverflow.com/questions/34910686/how-can-i-get-the-current-date-w-o-hour-and-minutes | Last Update : Sun, 10 Jan 21
Question : how to display current date time in flutter
Answered by : thankful-tapir
DateTime now = new DateTime.now();
DateTime date = new DateTime(now.year, now.month, now.day);
Source : https://stackoverflow.com/questions/34910686/how-can-i-get-the-current-date-w-o-hour-and-minutes | Last Update : Sun, 10 Jan 21
Question : how to display current date time in flutter
Answered by : thankful-tapir
DateTime dateToday = DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day) ;
Source : https://stackoverflow.com/questions/34910686/how-can-i-get-the-current-date-w-o-hour-and-minutes | Last Update : Sun, 10 Jan 21
Question : get current date in dart
Answered by : mizanur-rahaman
DateTime now = DateTime.now();
Source : | Last Update : Thu, 17 Mar 22