Svetlana
10th February 2003, 09:16
Hello, all.
How to display time in report?
I have tdsls050.trtm (domain tctime). It display in report 040397 but not "09:25:03"
Thanks.

croezen
10th February 2003, 11:27
declaration:
extern long uren
extern long minuten

detail.1:
before.layout:
uren = (tdsls051.trtm/3600)
minuten = ((tdsls051.trtm/3600.00) - uren) * 60

Svetlana
10th February 2003, 11:49
Yes, not nice, BUT it works .
Thank you very much.

Juergen
10th February 2003, 11:54
Svetlana,
maybe function tfgld0032 can help you. This function converts a time in hhmmss and opposite.

To use the function, you have to include this in your report script
#include "itfgld0032"

The two possibilities are:

A: function long itfgld0032.num.to.time(domain tctime trans.time)
This converts seconds to time in hhmmss

B: function domain tctime itfgld0032.time.to.num(long trans.time)
THis converts time to seconds

Good luck,
Juergen

Svetlana
10th February 2003, 12:35
Hi, Juergen.
I have
declaration
#include "itfgld0032"
long time.up

choice.user.1:
before choice:
time.up=itfgld0032.num.to.time(tdsls050.trtm)

functions
#include "itfgld0032"
I get error:Can't open input file 'itfgld0032'
What I have made not so?

Svetlana
10th February 2003, 15:36
It work.
I copy it function in my VRC. There are not error now.
Thanks.

hanslokhoff
12th February 2003, 20:53
Hi Svetlana,

I always use my own 'trick' (works !):

long time.input
string trtm(8)

time.input = tdslsxxx.trtm
trtm = edit$((time.input / 3600),"99") & ":" & edit$(((time.input - ((time.input / 3600) * 3600)) / 60),"99") & ":" & edit$((time.input - ((time.input / 3600) * 3600) - (((time.input - ((time.input / 3600) * 3600)) / 60) * 60)),"99")

If you use trtm on a form or in a report, you can decide if you want to show hh:mm:ss (use a string of length 8) or hh:mm (use a string of length 5)

Regards,
Hans.

NPRao
12th February 2003, 23:57
You can also try to use -

string buffer(30)
buffer = sprintf$("%u002 %U001", utc.num(), utc.num() )

morpheus
13th February 2003, 10:56
Originally posted by Svetlana
It work.
I copy it function in my VRC. There are not error now.
Thanks.

If there is a code for the include function, then there is no need of copying that include function in the current VRC. The script will use this include function, provided it is on the same VRC level or on any higher VRC level.
And, if there is no code available for the include function, then there is no point in copying the function in the current VRC, as at the time of execution the script will look for the function called (supposed to be present in the include function), and will throw an error, if it does not find one!!
Please correct me, if I am wrong.
:confused:

Svetlana
17th February 2003, 07:57
Hi, Morpheus.
You right certainly.
I have hastened with conclusions. I in BAAN recently.