Hey there! any question in your mind? Ask It Now!.

Popular Categories





get date in string format

+7 votes
620 views
asked in Programming by neha (560 points)

   in my table date is updating in this format 1395133877741 i need to get date in string formata in good format  by which user can understand. 

now code which is i am using 

java.util.Date date= new java.util.Date();

date.getTime();

1 Answer

+1 vote
answered by Kaperly (1,610 points)
selected by neha
 
Best answer

you should use this , its very simple.

java.util.Date date= new java.util.Date();

System.out.println(d.toString());

This will print 

Tue Mar 18 14:41:17 IST 2014

i think this format is usefull for you.

commented by neha (560 points)
thanks Kaperly!

Related Questions

0 votes
1 answer 9,923 views
+6 votes
1 answer 2,270 views
+2 votes
2 answers 809 views
+2 votes
1 answer 847 views
+1 vote
1 answer 908 views
+3 votes
1 answer 808 views
–1 vote
0 answers 153 views
+3 votes
2 answers 1,855 views
asked in Programming by krish Expert (6,310 points)
0 votes
1 answer 201 views
+6 votes
2 answers 2,954 views

Not a Member yet?

Ask to Folks Login

My Account
694 Folks are online
6 members and 688 guest online
Your feedback is highly appreciated