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



That format is close enough to a regular RPG timestamp that it should be easy enough to do. I know I have seen routines to do this in the past but google is not my friend and I cannot locate them today.

Timestamp format is yyyy-mm-dd-hh.mm.ss so you just need to replace the third - with a T and convert the .s to :s. Then add the UTC offset.

You can use CEEUTCO to get the UTC offset - but if you only run the code in one timezone you could just hard code that bit.

This is just off the top[ of my head so take it for what it is worth.

I guess you could also use the SQL xs: functions but the are designed for XML and seem complete overkill for your task.


Jon P.

On Jun 4, 2024, at 8:49 AM, Dave <dfx1@xxxxxxxxxxxxxx> wrote:

Hi,

IBM has a web page for these data types, but how should I go about
generating them from within an RPG program?
For example, xs:dateTime do we have anything to format a timestamp like
this ?
2009-10-10T12:00:00-05:00

Tia
--
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://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.



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.