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



I'm sure I'm missing something obvious, but I can't find anything appropriate in the RPG Reference or the archives.

If startDate and startTime are D and T types respectively, what is the simplest way to create a timestamp that represents that date/time? Here is what I've got:
startTS = %timestamp(%char(startDate : *ISO) + %char(startTime : *ISO) + '.000000');

I'm sure you'll agree this is less than ideal, if only because it is so verbose. Other attempts were:
startTS = startDate + startTime;
startTS = %timestamp(startDate + startTime);
startTS += startDate; startTS += startTime;

I suppose one way that might work, since this is SQLRPGLE already would be
exec sql SELECT TIMESTAMP(:startDate, :startTime) FROM sysibm/sysdummy1
INTO :startTS;

but it would be nice to have an non-SQL option.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.