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



Andy,

You are definitely on the right track.  QWCCVTDT was enhanced in V5R3 to 
support time zone parameters so that you can request a conversion from one 
time zone to another.  The daylight saving time adjustment is built in 
based on whether or not the source/target time zones are defined to 
support DST (with an optional parameter to indicate how to handle 
duplicate input time values like 1:05AM when "falling back".  The API will 
handle both past and future time values (though see the API Usage Notes 
for details on the range of valid dates as the range varies depending on 
the time formats you are using).

A CL example converting from Central to Mountain would be:

PGM 
DCL        VAR(&RCV) TYPE(*CHAR) LEN(20) 
CALL       PGM(QWCCVTDT) PARM(*YYMD '20050407140000000' + 
                       *YYMD &RCV 0 QN0600CST QN0700MST ' ' 0 '0') 
ENDPGM 

Bruce Vining
 



"Andy Hautamaki" <ahautamaki@xxxxxxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
04/13/2006 10:15 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"RPG400-L@xxxxxxxxxxxx" <RPG400-L@xxxxxxxxxxxx>
cc

Subject
QWCCVTDT - Convert Date and Time Format API






Am I on the right track on using the API QWCCVTDT to get what the date and 

time is from one time zone to another? Can I look at future dates and 
times?
How do I factor in daylight saving time?

Anybody happen to have an example on how I could do it if I can with this 
API?

Thanks
Andy Hautamaki

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.