Skip to Content
0

TIME_Duration

Jul 26, 2017 at 03:24 PM

85

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Aleksei BELOUSOV Jul 28, 2017 at 08:52 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Horst Schaude
Jul 27, 2017 at 11:16 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded