NetTalk Central

Author Topic: picture format for time >24  (Read 3104 times)

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
picture format for time >24
« on: May 14, 2014, 01:25:12 AM »
Hallo,


I need to calculate overtime per month and sometimes is over 24hours... how can I show in browse 33:00 ?
I try with picture format: @K##:##K but it will show me just 33 , the problems is that sometimes I have also minutes...
Is there some unsupported picture format in NT8 ?

Thank you,
Robert

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: picture format for time >24
« Reply #1 on: May 16, 2014, 01:34:57 AM »
Hi Robert,

As you probably know the Clarion FORMAT command does not format times greater than 23:59.
In my own programs I've written a small procedure that formats the string for me, and then I just use a string format when displaying that on a window.

The @p or @k format should work (although I've not tested it, and there may be some issues) but I don't think they really help in this case. They don't convert the underlying number to "time". So, for example, if the time (long) value is 720001 (about 2am) and you format it with @K##:##K, you just get (at best) 72:00 which is useless.

That said, there's quite a lot of infrastructure around pictures already in nettalk, so I think overcoming the 23:59 limit would be do-able. I'll see what can be done.

cheers
Bruce

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: picture format for time >24
« Reply #2 on: May 16, 2014, 01:47:16 AM »
Hallo Bruce,

Thank for reply.

The problem is that this app I develop is for maintenance and we have a lot of fields with time, calculation and totals of hour. The problem is when we have total of hours overtime per month and this sometime is over 23:59 hours ... there was situation with 44:00 hours... if there was only hours the I could make a long but they also have minutes... and this complicate things...
If you could do something in this case it will be great.

Thank you and appreciate your help.

Robert

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: picture format for time >24
« Reply #3 on: May 19, 2014, 10:32:49 PM »
done in 8.12

cheers
Bruce

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: picture format for time >24
« Reply #4 on: May 19, 2014, 11:32:17 PM »
Thank you Bruce!
Appreciate!
Robert