on 02-07-2008 8:51 AM
Hi Forum
I want to print the current date along with time in the format dd/mm/yyyy hh:mm:ss
Thanks & Regards
Jaspreet Kaur Grewal
the format is cumming correct but the time it shud give 3:13 which is my system time but its giving 9:32
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Date currDate = new Date(Calendar.getInstance().getTimeInMillis());
Format formatter = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
String formattedDate = formatter.format(currDate);
Regards,
Satyajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.