Solved

LOAD and long date formats

Posted on 2004-09-09
5
791 Views
Last Modified: 2012-06-21
Hello,

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:

Mon DD, YYYY

Examples:

Jan 1, 2003
Jul 12, 2004

How do I do this?
0
Comment
Question by:yoren
  • 3
  • 2
5 Comments
 
LVL 13

Expert Comment

by:ghp7000
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?
0
 
LVL 7

Author Comment

by:yoren
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.
0
 
LVL 13

Accepted Solution

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

Author Comment

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

Expert Comment

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

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how can i import or extract data from Progressor db? 6 283
InterSystems Caché OPEN QUERY 4 506
DB2 V8.02 and Oracle security audit information 12 294
Monitor SQL Insert 8 75
November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

821 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