This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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
Author

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.

Thanks
Manish Jain
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30586
    
154

Manish,
Take a look at this example.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Biju moozhikkara
Greenhorn

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");
System.out.println(sdf.format(date));
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.


Thanks
Manish Jain
 
GeeCON Prague 2014
 
subject: Problem with Date Format