Definitely the way to go.
My mantra from a recent presentation on these services:
<snip>
Think: If you do any of the following to an output file you are probably doing it wrong!
... some sample commands listed ...
</snip>

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Bak, Doug (LMF)
Sent: Tuesday, March 26, 2019 11:51 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: SQL string to date conversion

Replace "{library}" with the library name in the SQL statement below:

SELECT objname, objtype, objowner, objcreated, objtext, last_used_timestamp, change_timestamp
FROM TABLE(QSYS2.OBJECT_STATISTICS('{library}', '*PGM *SRVPGM *FILE')) AS a;

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of T. Adair
Sent: Tuesday, March 26, 2019 11:00 AM
To: midrange-l@xxxxxxxxxxxxxxxxxx
Subject: [EXTERNAL] SQL string to date conversion

THIS CAN'T BE THIS HARD!!! Am I just having a massive brain-cramp? I simply want to take a 6-character field (MMDDYY) and convert it to date format in SQL. I've tried various ways using cast(), I've tried various ways using convert(). I've Gaagled it and I've searched the archives, and I've still not found a solution.

We are on 7.2 and no, we're not current on PTFs. The 6-character "date"
field is coming directly from DSPOBJD.

There are other ways to get around this (example - substringing the character field) but this has infuriated me and I refuse to surrender!
This has to be something simple that I'm just missing! Somebody please put me out of my misery!

Thanks in advance, and please forgive my rant.

~TA~

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mailman_listinfo_midrange-2Dl&d=DwICAg&c=TRM22a2q2ENZDxdZ_Nz-0OCGEspXTWPuaB6Jil0RfKE&r=o-YzpsmRCPgZlWO4EB4wsOj50O0KPLUTK9BP-UzK-UQ&m=TVxkwomElThDBJRTEGYqNcX-g3g1Amw1FHhe9jwsrYk&s=ypeso9m-8yZ2SRJs7rlqNRtCHfYw-TNBmVcf5ngbiTk&e=
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_midrange-2Dl&d=DwICAg&c=TRM22a2q2ENZDxdZ_Nz-0OCGEspXTWPuaB6Jil0RfKE&r=o-YzpsmRCPgZlWO4EB4wsOj50O0KPLUTK9BP-UzK-UQ&m=TVxkwomElThDBJRTEGYqNcX-g3g1Amw1FHhe9jwsrYk&s=zW81kiKlYW_tP8k1sUs79krwR-TYTqUVWeFyqMKDY48&e=.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://urldefense.proofpoint.com/v2/url?u=https-3A__amazon.midrange.com&d=DwICAg&c=TRM22a2q2ENZDxdZ_Nz-0OCGEspXTWPuaB6Jil0RfKE&r=o-YzpsmRCPgZlWO4EB4wsOj50O0KPLUTK9BP-UzK-UQ&m=TVxkwomElThDBJRTEGYqNcX-g3g1Amw1FHhe9jwsrYk&s=0k8ef8qRkqYNWDfsredaDqIxUFCn4y2XlJ_npQvWu48&e=
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com

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.