Advertisement

06.30.2008 at 11:23AM PDT, ID: 23527824
[x]
Attachment Details

Date format for WHERE clause error

Asked by FindlayIT in DB2 Database

Tags: SQL, AS400

A previous question of mine helped format a date column as DATE(CHAR(DIGITS(DAY) || '/' || DIGITS(MONTH) || '/' || DIGITS(CENTURY) || DIGITS(YEAR))).

The column output is great. However when I go to reate a where filter and such as DATE(CHAR(DIGITS(DAY) || '/' || DIGITS(MONTH) || '/' || DIGITS(CENTURY) || DIGITS(YEAR))) = '04/07/2008' or '2008-04-07' I get the following error:

[IBM]{iSeries Access ODBC Driver][DB2 UDB]SQL0181 - Value in date, time, or timestamp string is not valid.

Thanks,

JohnStart Free Trial
[+][-]06.30.2008 at 11:32AM PDT, ID: 21901702

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.30.2008 at 11:37AM PDT, ID: 21901756

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.30.2008 at 11:41AM PDT, ID: 21901802

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.30.2008 at 11:45AM PDT, ID: 21901842

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.30.2008 at 11:48AM PDT, ID: 21901871

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.30.2008 at 02:50PM PDT, ID: 21903321

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.30.2008 at 05:20PM PDT, ID: 21904051

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: DB2 Database
Tags: SQL, AS400
Sign Up Now!
Solution Provided By: Kdo
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.30.2008 at 08:58PM PDT, ID: 21904907

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.01.2008 at 09:12AM PDT, ID: 21909098

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628