You could check for the 5th and 8th characters being "-" before using
CVTDAT. Not very elegant but will work.

Vinay

On Thu, Jan 22, 2009 at 10:55 AM, Michael Rosinger <mrosinger@xxxxxxxxx>wrote:

Nick, Mark, et-al,

I tried using CVTDAT and it works for the most part but it let me get away
with "YYYY/MM/DD" even though I specified *ISO. When I passed the date into
a RUNSQLSTM, it failed because that is not kosher ISO for this schema
configuration. I looked at the TOSEP parameter but that only applies to the
TO date - not the FROM.

Any ideas?

--
Regards,

Michael Rosinger
Applications Manager
Computer Credit, Inc.
640 West Fourth Street
Winston-Salem, NC 27101
336-761-1524
m rosinger at cciws dot com
"Michael Rosinger" <mrosinger@xxxxxxxxx> wrote in message
news:mailman.2169.1232637993.21608.midrange-l@xxxxxxxxxxxxxxx
Yes, that would do it. I wasn't aware of that command. Thanks.

--
Regards,

Michael Rosinger
Applications Manager
Computer Credit, Inc.
640 West Fourth Street
Winston-Salem, NC 27101
336-761-1524
m rosinger at cciws dot com
<Nick_Radich@xxxxxxxxxxxxxx> wrote in message
news:mailman.2163.1232637779.21608.midrange-l@xxxxxxxxxxxxxxx
Hi Michael,

Would the CVTDAT command help?

It will give you an error if the date is invalid.



Thanx,

Nick



Nick Radich
Sr. Programmer/Analyst
EPC Molding, Inc.
Direct (320) 679-6683
Toll free (800) 388-2155 ext. 6683
Fax (320) 679-4516
nick_radich@xxxxxxxxxxxxxx



"Michael Rosinger" <mrosinger@xxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
01/22/2009 09:16 AM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
midrange-l@xxxxxxxxxxxx
cc

Subject
how to validate a date in CL?






List,

I need to pass in 2 dates to a CLLE program in the ISO format
YYYY-MM-DD.
Is
there a straightforward way to validate a date value from a CLLE program
instead of assuming they are valid? Suggestions?

--
Regards,

Michael Rosinger
Applications Manager
Computer Credit, Inc.
640 West Fourth Street
Winston-Salem, NC 27101
336-761-1524
m rosinger at cciws dot com


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






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