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

Popular Categories





get date in string format

+7 votes
568 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,844 views
+6 votes
1 answer 1,721 views
+2 votes
2 answers 791 views
+2 votes
1 answer 558 views
+1 vote
1 answer 801 views
+3 votes
1 answer 677 views
–1 vote
0 answers 116 views
+3 votes
2 answers 1,833 views
asked in Programming by krish Expert (6,310 points)
0 votes
1 answer 153 views

Not a Member yet?

Ask to Folks Login

My Account
619 Folks are online
85 members and 534 guest online
Your feedback is highly appreciated