LOAD and long date formats

Posted on 2004-09-09
Last Modified: 2012-06-21

I'm experienced with databases but still new to DB2. I've been using the LOAD utility to load data and have done so successfully with dates of the form YYYY-MM-DD. Now I need to load data that contains dates in this format:



Jan 1, 2003
Jul 12, 2004

How do I do this?
Question by:yoren
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 13

Expert Comment

ID: 12023081
you will have to write either a UDF, a stored procedure or a c program to convert the date formats you have to valid dates. What is the source of your data, an excel data sheet?

Author Comment

ID: 12024130
Thanks for the response. So DB2 can't read that format natively? That's unfortunate. What's involved in writing a UDF (and what is it)? If I write one, will I be able to use the LOAD utility?

The source of the data is a proprietary database program. It can be made to export into YYYY-MM-DD, but the default is what I stated above. I was hoping to be able to handle the default format.
LVL 13

Accepted Solution

ghp7000 earned 125 total points
ID: 12032540
no, db2 cant read the format, your easiest solution is to export to YYYY-MM-DD format.

Author Comment

ID: 12037417
Yet another reason to use Oracle! Too bad I have no choice in the matter.
LVL 13

Expert Comment

ID: 12039820
Well, its not such a big point, you can simply export the data from the source in the required format

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : All lightning effects with instructions : http://www.mediaf…
Suggested Courses

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question