ecoman68
24th July 2003, 02:04
Hi 2 all,

i've a problem: when i'm creating a new time-domain, i can enter at the field "Display Format" at "ttadv4100m000" for example the value "%T001".

-> Where are those time-formats stored or could be edit (date-formats are in "ttadv480" and can be edit with "ttadv4180m000")?

I've searched all table-descriptions for "time" or "format" without any result...

At the help-informations are also no hints for "%T"-formats?!?

My problem is, that i need a time-domain (long), which is dislayed like "17:06:23" (24 hour).


Please, please, please help me!!! ;)

Thx a lot! :p

Cu,
Ecoman68

walter01
24th July 2003, 10:01
I don't know much about this but is it possible to use the formatting possibilities of the sprintf$ function ?
For example %U ?

Walter

rupertb
24th July 2003, 10:22
Want you want is unfortunately not there my work-around is as follows:

(don't forget to include library tcqmsdll0001)

Form field is called 'book.in.time' (of type long with display format "99:99:99")


field.book.in.time:
before.display:
book.in.time = tcqms.dll0001.num.to.time(tcqms913.time)
before.input:
if previous.choice = dupl.occur then
|* don't set time to current
else
book.in.time = tcqms.dll0001.num.to.time(time.num())
endif
after.input:
temp.time = edit$(book.in.time,"999999")
if val(temp.time(1;2)) > 23 or
val(temp.time(3;2)) > 59 or
val(temp.time(5;2)) > 59 then
message("Invalid Time Format!",1)
input.again()
else
tcqms913.time = tcqms.dll0001.time.to.num(book.in.time)
endif


Regards,
Rupert

dorleta
24th July 2003, 10:33
you can do of this way:

function extern long secs.to.hhmmss(long secs)
{
DLLUSAGE
return: secs (the number of seconds since midnight) converted to hhmmss
ENDDLLUSAGE
return ( 10000*(secs/(3600)) + 100*((secs\(3600))/60) + secs\60 )
}

this function and others are in tudlldata_time

and programming a bit of course.

good luck.