File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Problem with Date Format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Problem with Date Format" Watch "Problem with Date Format" New topic

Problem with Date Format

Manish Jain
Ranch Hand

Joined: Jun 07, 2005
Posts: 30
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.

Manish Jain
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33107

Take a look at this example.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Biju moozhikkara

Joined: Oct 21, 2005
Posts: 20
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");
Manish Jain
Ranch Hand

Joined: Jun 07, 2005
Posts: 30
Thanks Jeanne and Biju ..I think now i am able to do some workarounds. Thanks for all your help.

Manish Jain
I agree. Here's the link:
subject: Problem with Date Format
It's not a secret anymore!