Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 28th, 2005, 10:29 PM
Authorized User
 
Join Date: Aug 2004
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

 
Old July 22nd, 2005, 11:15 AM
Authorized User
 
Join Date: Jul 2004
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
 
Old March 6th, 2007, 08:29 AM
Registered User
 
Join Date: Mar 2007
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






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





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