Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with Date Format

 
Manish Jain
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am working on the project which actually uses java not in presentation layer but in all other layers of project. In our presentation layer we are using flex. My question is very simple. I want to retrive the records from the database based on date.
From presentation layer , I am getting the date in the format


I want to convert the date of this format to the format that SQL Server 2000 can understand by using some date functions. I will appreciate if some can help me in this regard.

Thanks
Manish Jain
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34672
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Manish,
Take a look at this example.
 
Biju moozhikkara
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check whether this will help ..
u can use diferend date format as u wish for ex "hh:mm:ss" or "dd mm yyyy"
or "dd mm yyyy hh:mm:ss"
Date date = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("dd mm yyyy");
System.out.println(sdf.format(date));
 
Manish Jain
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeanne and Biju ..I think now i am able to do some workarounds. Thanks for all your help.


Thanks
Manish Jain
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic