Function:HMS2TIME(Hour : Code[2];Minute : Code[2];Second : Code[2]) Time : Time EVALUATE(Time,Hour+':'+Minute+':'+Second);But how do I insure that it works for all imaginable reginal setting?
Time := 123012T;But not like this:
EVALUATE(Time,'123012T');I can see that 4.00 introduce a new parameter for EVALUATE to solve the problem, but what should I do for 3.60?
Comments
so you should define this format
like
Time:= format(<hours24,2>,<minutes,2>,<seconds,2>);
or in what format you really want to do this.
maybe need to use <filter character> to obtain perfectly
TimeVar := 000000T + ((Hours * 60 + Minutes) * 60 + Seconds) * 1000 + miliSeconds;
To be sure that get a correct hour, minute... variable values check them.
eksekj> How can I use FORMAT from Text to Time? I thougt it was only the opposite..
i4tost> Seems to work as well. Thanks.
I actually have milliseconds as well, so I will use i4tost's method, but thanks to all of you :-)
Peter