import 'package:intl/intl.dart';
DateTime now = DateTime.now();
String formattedDate = DateFormat('yyyy-MM-dd – kk:mm').format(now);
Format Pattern Result
-------------- -------
'EEE, MMM d, ''yy' Wed, Jul 10, '96
'h:mm a' 12:08 PM
'yyyyy.MMMMM.dd GGG hh:mm aaa' 01996.July.10 AD 12:08 PM
import 'package:intl/intl.dart';
dart pub add intl
DateTime dateTime = dateFormat.parse("2019-07-19 8:40:23");
DateFormat dateFormat = DateFormat("dd/MM/yyyy HH:mm:ss");
Code Example |
---|
C :: _CRT_SECURE_NO_WARNINGS |
C :: c colour text |
C :: reset style matplotlib |
C :: find string in all files powershell |
C :: how to remove button decoration |
C :: random number between 2 in C |
C :: arduino wifi ip address to string |
C :: convert from integer to string vb |
C :: Donut-shaped C code |
C :: zizag c |
C :: print boolean value in c |
C :: rl_replace_line |
C :: how to get user input in c |
C :: C program to count number of digits in a number |
C :: for loop c |
C :: convert number to string c |
C :: add field to model rails |
C :: how to sleep in c |
C :: c check if character is a digit |
C :: xor swap |
C :: Area of a Circle in C Programming |
C :: factorial of a number in c |
C :: c radians |
C :: vowel and consonant C |
C :: functions in c |
C :: delete string function in c |
C :: do...while loop c |
C :: Installing Tailwind |
C :: how to sort an int array in c |
C :: what is type casting in c programming |