Skip to Content

TIME_Duration

Hi,

In ABSL I need to assign a value to a variable of TIME_Duration type (from Standard BO).

I found no functions like "ParseFromString" converting a string into the value of such type (Duration type does not fit).

Is there some workaround for that type?

Thank you.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jul 28, 2017 at 08:52 AM

    Thank you, Horst,

    Eventually, I fingered out we can just assign a plain string to a variable of the type, for example, we can act in such a manner:

    var x : TIME_Duration;
    x = "PT0H5M0S";

    The warning message which appears on this code ("..can not be assigned..") can be ignored. It will be work properly anyway.

    Thank you.

    Best regards,

    Aleksei

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 27, 2017 at 11:16 AM

    Hello Aleksei,

    From the Repository Explorer I got this definition

    TIME_Duration is a restriction of Duration where only values for hours, 
    minutes, seconds and fractions of seconds are allowed.
    The representation is as follows:
    PTnHnMnS
    Example:
    PT4H12M40S

    There is no library function for this special case of a Duration. :-(

    So if you have the hours, minutes, and seconds you need to build up the TIME_Duration by yourself.

    Sorry,
    . Horst

    Add comment
    10|10000 characters needed characters exceeded