Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 28th, 2005, 10:29 PM
Authorized User
 
Join Date: Aug 2004
Location: , , .
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Convert date String (dd/mm/yy) to dd- Month- yy


Hi,

I want to convert dsate string mm/dd/yyyy and dd/mm/yyyy to dd - Month - yyyy as 23-Jun-2005 , formated as Oracle Date

Thank

Minh Phan

Reply With Quote
  #2 (permalink)  
Old July 22nd, 2005, 11:15 AM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if you want to insert a date into oracle you don't need to do it in java, just specify the format in your sql statement

e.g.

insert into mytable (date_of_birth)
values(to_date('01/09/1998','MM/DD/YYYY'))

when you extract it:

select to_char(date_of_birth ,'DD-MMM-YYYY')
from mytable

not sure on the oracle date patterns, you'll have to check.

As for doing it in java, I'd personally construct a java.util.Calendar object and set the individual bits, then construct a new string from the Calendar object, but I don't suppose you'll be able to do it without creating an array of month names.

Chris J
Reply With Quote
  #3 (permalink)  
Old March 6th, 2007, 08:29 AM
Registered User
 
Join Date: Mar 2007
Location: pune, maharashtra, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i want insert date in dd/mm/yy format in vb form,plese help me

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert dd/MM/yyyy to MM/dd/yyyy Rg2005 VB.NET 2002/2003 Basics 2 November 7th, 2008 06:42 PM
How to pull Month & Year from Date(dd/mm/yyyy) istcomnet Classic ASP Basics 2 April 22nd, 2008 06:22 PM
Display date as mm-dd-yy (without century) elygp ASP.NET 1.0 and 1.1 Professional 1 May 9th, 2007 03:21 AM
Converting date to yy.mm.dd format using CONVERT Jinn SQL Server 2000 6 October 14th, 2006 06:44 PM
convert "MM/dd/yyyy" to "dd/MM/yyyy" xin56 General .NET 4 March 28th, 2005 05:33 AM



All times are GMT -4. The time now is 11:04 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.