|
What is your default date set to? If it is not set to a *USA typethe
format it would fail. The default that is set if you did not change it
is *ISO which is '2012-05-14'. You probably need to tell it which date
format to use. *MDCCYY probably.
select convertoidate('5/14/2012','*MDCCYY') form VXBEPIERM
The default date is in the documentation.
On Wed, May 30, 2012 at 9:17 AM, Jeff Young <jyoung0950@xxxxxxxxx> wrote:
Hi Alan,wrote:
I was calling is from the i (strsql) using the following:
Select ConvertToiDate('5/14/2012') FROM VXBEPIERM Fetch first 1 row
only
Thanks,
On Wed, May 30, 2012 at 11:05 AM, Alan Campin <alan0307d@xxxxxxxxx>
wrote:
Difficult to say from a distance. Where are you calling the
function from? On the iSeries or from a PC. If calling from a PC,
you need to qualify with library holding the function.
As to your question as to whether iDate can handle a 5/5/2012 type
date. Yes it can. You can call a function in the service program
directly that will return a date.
On Wed, May 30, 2012 at 7:50 AM, Jeff Young <jyoung0950@xxxxxxxxx>
functionAll,
I have installed the iDate utility and the Select iDate(Date...)
theworks fine, but when I try to use the ConvertToiDate function, I
get
ALTERfollowing message:
Message ID . . . . . . : SQL0204 Severity . . . . . . . :
30
Message type . . . . . :
Diagnostic
Message . . . . : CONVERTTOIDATE in *LIBL type *N not
found.
Cause . . . . . : CONVERTTOIDATE in *LIBL type *N was not found. If
the
member name is *ALL, the table is not partitioned. If this is an
found.TABLE
statement and the type is *N, a constraint or partition was not
theIf
this is not an ALTER TABLE statement and the type is *N, a
function, procedure, trigger or sequence object was not found.
If a function was not found, CONVERTTOIDATE is the service
program that contains the function. The function will not be
found unless the external name and usage name match exactly.
Examine the job log for a message that gives more details on
which function name is being searched for and
name
that did not
match.
Recovery . . . : Change the name and try the request again. If
anobject
is a node group, ensure that the DB2 Multisystem product is
installed on your system and create a nodegroup with the
CRTNODGRP CL command. If
inexternal function was not found, be sure that the case of theNAME
EXTERNAL
on the CREATE FUNCTION statement exactly matches the case of the
name exported by the service program.
When I check the results of the create program for iDate, I see
the
messsages:
SQL7997 0 105 Position 3 Function CONVERTTOIDATE was created
inR37MODSC77.
SQL7997 0 116 Position 3 Function CONVERTTOIDATE was created
listR37MODSC77.list
The library containing the service program *is* in my library list.
I am on V6R1M1.
Thanks,
--
Jeff Young
Sr. Programmer Analyst
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,--
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please
take a moment to review the archives at
http://archive.midrange.com/midrange-l.
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing
listTo post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please
take a moment to review the archives at
http://archive.midrange.com/midrange-l.
--
Jeff Young
Sr. Programmer Analyst
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,--
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please
take a moment to review the archives at
http://archive.midrange.com/midrange-l.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.