sdjaz
04-24-2003, 07:04 PM
Converting 2 character dates to 4 char dates using Java
I am fairly new to java and I've been searching and searching to find out how to convert the following string date from text file to a string date that has a 4 character year.
Here is how it's stored in the file: 030421 representing April 21, 2003 in YYMMDD format and I want to convert the string to look like this: 2003-04-21 format to insert into an oracle database.
Do you have any sample code or suggestions on how to do this? I've tried everything under the SUN lol , to get this to work to no avail.
I appreciate any assistance you can give me or forwarding to any website that may be able to give me the answers I'm looking for.
Thanks,
Jim Z.
I am fairly new to java and I've been searching and searching to find out how to convert the following string date from text file to a string date that has a 4 character year.
Here is how it's stored in the file: 030421 representing April 21, 2003 in YYMMDD format and I want to convert the string to look like this: 2003-04-21 format to insert into an oracle database.
Do you have any sample code or suggestions on how to do this? I've tried everything under the SUN lol , to get this to work to no avail.
I appreciate any assistance you can give me or forwarding to any website that may be able to give me the answers I'm looking for.
Thanks,
Jim Z.