|
Here is the code that failed: D Time1 S T Timfmt(*USA) D Time2 S T Timfmt(*USA) D Tmp8n S 8 0 D Tmp8 S 8 C Move *LoVal Time1 C Do 96 C *USA Move Time1 Tmp8 C Eval %SetAtr('TimeCard':'SpinIn':'AddItemEnd') C =Tmp8 C Adddur 15:*Minutes Time1 C End C Move *LoVal Time1 C Do 96 C *USA Move Time1 Tmp8 C Eval %SetAtr('TimeCard':'SpinOut':'AddItemEnd') C =Tmp8 C Adddur 15:*Minutes Time1 C End C Eval Tmp8 = C %Getatr('Timecard':'SpinIn':'Text') C Move Tmp8 Time1 C Eval Tmp8 = C %Getatr('Timecard':'SpinOut':'Text') C Move Tmp8 Time2 C Time2 SubDur Time1 Tmp8n:*Minutes That is all the relevant code I think. The spin buttons are loaded only from the Addur 15:*Minutes command, so I am sure I didn't make a typo on the spin buttons, and only valid times are on the spinner. It fails only when on %GETATR between midnight and 1. _______________________ Booth Martin Booth@MartinVT.com http://www.MartinVT.com _______________________ Jon.Paris@hal.it Sent by: owner-rpg400-l@midrange.com 09/05/2000 10:53 AM Please respond to RPG400-L To: RPG400-L@midrange.com cc: Subject: Re: Has anyone had trouble with Move and time fields? >> Has anyone had trouble with Move and time fields? ... I just tried moving a *USA time field to a *HMS time field and getting an error. The following works fine on V4R4 for me Booth - the only limit I know of for *USA fields is that they can't be moved to numerics ('cos of the AM/PM I guess) but that would affect you all the time not just after midnight. Did I understand the question correctly? D USATime S T TimFmt(*USA) Inz(T'00.01.00') D HMSTime S T TimFmt(*HMS) C Move USATime HMSTime C USATime Dsply C HMSTime Dsply C Eval *InLR = *ON +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.