But I do not think the Print mode indicators work for display on Panel Fields, otherwise you just use the Print Mode indicator THMS99:99;;E, which works fine in Reports
I have to say I have not weighed in on this discussion like I usually do :-) because I was worried that there was not going to be a clearcut solution. Time fields are a special number format, and the empty field is a zero (DP doesn't really have the concept of a Null data type), and 00:00 really is a valid time, so what if something really did happen at 00:00 I think if I was forced to do this, and depending on how the data gets into this field, if it were a human data entry field, I would rethink the time field, and change it to a Text field. I would use a formula on this text field that acts on itself, to format it the way you want. So an empty string would be different to the "00:00" string. You would need a validating formula, which would need subfields, and test to see that the first subfield (hour) was in the range 0 to 23, and the 2nd subfield (minute) was between, or see if you can force it to use the Apply.format with a T99:99;;E to give you blanks when it was 00:00. But doing it this way means a blank field would truly be a time entry that had not been entered. This however means that to use this for time calculations you variously have to be using the Convert[] and Apply.format, and if you wanted to If the data in the time field was added by result of a formula to capture the current time and date, and if 00:00 was an unlikely date, I would make this real field hidden T99:99::H and have an non updateable Text field A6::N to display it. In terms of screen real estate, I think you can get away with the Time field only being T9::H so it only takes up 1 char on screen space, because I think the T format preallocates space, the digits are just there for the eye candy of the visual display. But if you do the T9 trick (or in fact if you do a similar trick on D fields) if you use the Built-In Special Report to export data when say you are modifying the application, you get into a bind because the time field is truncated, and lost during the Export, and hence not available for subsequent Import. (Painful experience talking here) Regards Brian _____ From: [email protected] [mailto:[email protected]] On Behalf Of Patrick Riley Sent: Tuesday, 20 October 2009 2:16 PM To: [email protected] Subject: Re: [Dataperf] Time field query (more) Michael, I'm pretty sure ;;H is not a valid print suffix. The print suffix ;;E will print your empty field as a blank but will print 7:00 as 7: (no zeros to the right of the colon). This is guaranteed to work. Create a report variable (RV) based on the below formula and then print the RV formatted as A5. Your empty time field will print as blank while all other times will print as you format in the formula. Here's the formula (P1F2 is your time field): if P1F2 = 0 then "" else apply.format["T99:99";P1F2] endif Here's some sample output: Field Output ---------------------- 1 12:57 12:57 2 03:45 03:45 3 00:00 4 06:06 06:06 5 07:00 07:00 6 00:07 00:07 I hope this helps. Pat Riley 505-797-9072 At 05:20 PM 10/19/2009, you wrote: You might use the ::H suffix to hide the field. Sent from my iPhone Don Friedman ProfessionalRecords.Com LCC 413-784-1600 412-784-1615 FAX On Oct 19, 2009, at 4:34 PM, Michael Iannantuoni <[email protected]> wrote: Don, Thanks for the suggestion but although the text field would display the way I wanted, wouldn't the original time field still display? Michael Don Friedman wrote: Michael - offhand I'd say that the most obvious way is to use a computed text field programmed to duplicate the time field unless it reads 00:00 in which case it is empty or reads N/A or something like that. Good luck. Don Friedman Pittsburgh On Sun, Oct 18, 2009 at 7:57 AM, Michael Iannantuoni <[email protected]> wrote: I have a database which includes a Time filed formatted as T99:99 so that 24 hour clock times display correctly with leading and trailing zeros eg 09:30, however some records do not have time data so the field displays 00:00. This can be misleading; is there a way to display time fields so that entered data displays, even 00:00, but if nothing is entered then the field does not display or displays as blanks? Michael _______________________________________________ Dataperf mailing list [email protected] http://lists.dataperfect.nl/mailman/listinfo/dataperf -- Don Friedman ProfessionalRecords.Com LLC PRS Data Systems 205 S Main Street Pittsburgh, PA 15215 412-784-1600 - 1-800-PRS-FILE 412-784-1615 Fax _______________________________________________ Dataperf mailing list [email protected] http://lists.dataperfect.nl/mailman/listinfo/dataperf _______________________________________________ Dataperf mailing list [email protected] http://lists.dataperfect.nl/mailman/listinfo/dataperf _______________________________________________ Dataperf mailing list [email protected] http://lists.dataperfect.nl/mailman/listinfo/dataperf
_______________________________________________ Dataperf mailing list [email protected] http://lists.dataperfect.nl/mailman/listinfo/dataperf
