473,320 Members | 2,098 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,320 software developers and data experts.

Int to Date in DB2 SQL on AS400

All:

CAVEAT: I'm not really an AS400 jockey, I just play one on TV.

Keeping that in mind......

I'm using a legacy AS400 application where all dates are stored as Integers, e.g. 05/01/2007 = 20070501. I figured out yesterday how to change the format from an INT to a DATE
(
date(SUBSTRING(CAST(OAENTD AS VARCHAR(8)),5,2)concat'/'concat
SUBSTRING(CAST(OAENTD AS VARCHAR(8)),7,2)concat'/'concat
SUBSTRING(CAST(OAENTD AS VARCHAR(8)),1,4)) AS EntryDate
)
What I'm trying to figure out now is what the actual format of the date field is so that I can perform operations (>=, <=, BETWEEN, etc. ) against it. Whenever I try to perform an operation now it returns the error "operands not compatible"

Many thanks in advance.

Oncorhynchus
Jun 14 '07 #1
0 4105

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: fn | last post by:
Can anyone help me understand what it takes to define a Linked Server connection to an IBM eSeries (AS400)? Do I need Microsoft's SNA Server or some other product or can I simply do it with the...
2
by: Niyazi | last post by:
Hi, Our company uses IBM AS400 and DB2 (version 4.5 I guess). I have to do some report but I donot know how to access the AS400 DB2. I search IBM unfortunately IBM site in mess. Can anyone tell...
2
by: Niyazi | last post by:
Hi, I have to retrieve a data from AS400 DB2 and after working with data I have to export into one of existing Excel file. I can connect into specific library in AS400 DB2 using AS400...
0
by: alan_sec | last post by:
Hi. Does the com.ibm.as400.access.AS400JDBCDriver driver that is part of JTOpen (http://jt400.sourceforge.net) works with db2 udb version 7 that is installed on windows 2000? I' m trying to...
13
by: Sehboo | last post by:
Hello, we have data sitting on AS400 (V4R5M0) - DB2-400. I need to access that from my vb.net application. I don't know anything about AS400. Is it possible to get data from tables and stored...
6
by: MadMan2004 | last post by:
Hello all! I'm having a problem with a project I'm working on and I'd like to ask for anyone's input that might be helpful. I'm building a rather large front-end application connecting to an...
1
by: Iain | last post by:
Hi All I am creating a database trigger to write details real time from tables on one AS400 to another over our WAN. Is there such a concept as ODBC connections on the AS400 to perform this...
1
by: accyboy1981 | last post by:
Hi, I'm new to AS400 and am trying to copy the contents of a table from an SQL Server 2000 table to a table in AS400, I'm doing this using DTS. I'm connecting using the iSeries Access ODBC...
1
by: cjordan | last post by:
Hi everyone. I'm new here, and I think I've got a pretty unique problem (haven't found any solution to this anywhere else), but I'm hoping that someone here can help me. To be honest, I'm not a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.