×
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.
Sounds like a good candidate for a UDF if you're going to do this regularly
Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Birgitta Hauser
Sent: Thursday, July 21, 2022 10:59 PM
To: 'RPG programming on IBM i' <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: Timestamps
AFAIK there is no direct conversion (neither in RPG nor in SQL) for this
format.
In pure RPG you have to deal with %XLATE and/or %SCANRPL to convert it into
a valid character representation of the timestam and then convert the
result.
With SQL it is a little easier, but you still have to remove T and Z:
Exec SQL SET :YourTimestamp = Timestamp(Translate('2022-07-21T20:14:36Z', '
', 'TZ'));
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
Modernization - Education - Consulting on IBM i
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
"Train people well enough so they can leave, treat them well enough so they
don't want to." (Richard Branson)
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Greg
Wilburn
Sent: Donnerstag, 21. Juli 2022 22:49
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Timestamps
Is there a slick way to compare the current UTC time with a character
"timestamp" value like this?
'2022-07-21T20:14:36Z'
This is for the token expiration for AWS. The timestamp formats for the
various services are different.
I was hoping not to have to do it manually by %SUBST or %SCANRPL (replacing
T and colons with period and removing the Z).
TIA
Greg
[Logo]<
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.totalbizfulfillment.com%2F&data=05%7C01%7C%7C699322155688469dc91a08da6ba74379%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637940663383371545%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=skB2qgOxuOdf4qkXNzFz6aBxQ1PynfP2IbR%2Bv22faHs%3D&reserved=0> Greg Wilburn
Director of IT
301.895.3792 ext. 1231
301.895.3895 direct
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx<mailto:gwilburn@xxxxxxxxxxxxxxxxxxxxxxx>
1 Corporate Dr
Grantsville, MD 21536
https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.totalbizfulfillment.com%2F&data=05%7C01%7C%7C699322155688469dc91a08da6ba74379%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637940663383371545%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=whsrcZRCo4mADok859JBuMy9d1kSTBG6zWXtXUelZTU%3D&reserved=0<
https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.totalbizfulfillment.com%2F&data=05%7C01%7C%7C699322155688469dc91a08da6ba74379%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637940663383371545%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=whsrcZRCo4mADok859JBuMy9d1kSTBG6zWXtXUelZTU%3D&reserved=0>
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit:
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Frpg400-l&data=05%7C01%7C%7C699322155688469dc91a08da6ba74379%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637940663383371545%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=TsNvmRKLf9T%2Borc%2F2KOdqDVqUecedUpmcbeAUuxB1gs%3D&reserved=0
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Frpg400-l&data=05%7C01%7C%7C699322155688469dc91a08da6ba74379%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637940663383371545%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=jMN3z9Exr86dNUJzTnOjrx5j0Rt9zQDG3Ren%2BKtayWk%3D&reserved=0.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Famazon.midrange.com%2F&data=05%7C01%7C%7C699322155688469dc91a08da6ba74379%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637940663383371545%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=nOUf0vlQ5p6PFpA4qkQRofUdQEuFBHLFJ%2FOCh6ZMYas%3D&reserved=0
As an Amazon Associate we earn from qualifying purchases.