× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Cool! My dates are in 4 2/0 fields so I am having to do a lot of work.


Sharon Wintermute

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Campin
Sent: Friday, January 16, 2009 12:52 PM
To: Midrange Systems Technical Discussion
Subject: Re: SQL Functions

Sharon, don't know if you are interested but if you go to
http://www.think400.dk/downloads.htm and look for iDate you will find a
complete user defined function that converts AS/400 type dates (numbers,
char, etc) into true date data types (iDate) and a User Defined function
that converts a date data type into an integer. (ConvertToiDate).

SELECT ConvertToiDate(iDate(ORDATE)) FROM "ORDER"

This statement converts a 8 digit date as/400 type date to a date data
type
and then back to an integer.

iDate supports all kinds of dates formats. Complete documentation is
included.

*MDY
*CCYYMDD
*YMD
etc

You will find all you need to do User Defined Functions. Hope this
helps.
Let me know if you have questions.

On Fri, Jan 16, 2009 at 11:17 AM, Wintermute, Sharon <
Sharon.Wintermute@xxxxxxxxxxxxxxxx> wrote:


I am finally diving into SQL functions. I created my first function.
CURDATE80 which returns the current date as an INT type. (Had to try
something simple first).

When I look on Ops Nav, I can see the function in the schema. (Its in
QGPL for now.)

If I try to use it, it doesn't find it.

What step did I miss? Oh, V5R4M0.


TIA,

Sharon Wintermute

--
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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.