473,327 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Conversion of packed data to db2 date

I have date stored in table as following example:

115514 Equates to March 14, 1996

it is stored from the date of 1900-01-01 to 1996-03-14

Month/Year = 1155 and day = 14

96 X 12 = 1152 + 3 = 1155

I want to be able to convert this to actual date using DB2

Please help

Thanks

N. Sinnadurai

Nov 10 '06 #1
1 2690

nesans wrote:
115514 Equates to March 14, 1996

it is stored from the date of 1900-01-01 to 1996-03-14

Month/Year = 1155 and day = 14

96 X 12 = 1152 + 3 = 1155

I want to be able to convert this to actual date using DB2
Is this homework?
If not, you should have considered the way to convert packed date to
db2 date bofore you put data in a table with packed data format.
DATE('1900-01-01') + (packed_date/100-1) months +
(MOD(packed_date,100)-1) days

Nov 10 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: tamrakar | last post by:
Please let me know how I can Load a packed decimal date coming from a file from mainframe be loaded into a Oracle table date column? Any help will be appreciated. Thanks,
1
by: Shahzad | last post by:
Dear Respected Gurus/Sirs, I would like to share your ideas and get reviews will be highly appreciated in anticipation Question No.1 I had developed a seprate audit/security database that...
56
by: ccwork | last post by:
Hi all, Here is a sample code segment: .... typedef PACKED struct { union { PACKED struct { char red:1;
3
by: Brian Henry | last post by:
Does anyone know of or know how to convert a COBOL packed decimal in a text file to a decimal that .NET can work with? we are importing Old COBOL data files that have packed data in them and need...
15
by: Daniel Rudy | last post by:
What is the difference between packed and unpacked structs? -- Daniel Rudy Email address has been base64 encoded to reduce spam Decode email address using b64decode or uudecode -m Why...
3
by: Ven | last post by:
Hi, I want to convert a decimal feild into a packed decimal field in my C++ program. How can I do that ? Is there any functions in C++ that can do that. I am using g++ compiler to compile my...
0
by: =?Utf-8?B?RGVuaXMgU29oZXQ=?= | last post by:
Hi all, I've created a new project to test ObjectDataSource component. I've just added a new objectdatasource, configured it (linked to a table) etc ... It works fine on localhost, i can...
5
by: Ivan Velev | last post by:
Hello, Minimal example below - it gives me different output if I comment / uncomment the extra time.mktime call - note that this call is not related in any way to main logic flow. When...
5
by: Praveena P | last post by:
Hi folks, I am new to Python... so am not too sure about how the type conversion works. I have to read a file that contains hexadecimal data and use the data further to do some arithmetic...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.