Answers for "flutter datetime time only date"

1

flutter datetime.now only time

import 'package:intl/intl.dart';

DateTime now = DateTime.now();
String formattedTime = DateFormat.Hms().format(now);
print(formattedTime);
Posted by: Guest on June-03-2021
-1

how to show date only in flutter

import 'package:intl/intl.dart';
String now = DateFormat("yyyy-MM-dd").format(DateTime.now());
Posted by: Guest on January-03-2021

Code answers related to "flutter datetime time only date"

Code answers related to "Dart"

Browse Popular Code Answers by Language