Skip to Content
avatar image
Former Member

Agentry - rule convert string to date

Hi,

I want to initialize a Date Property with a string value ("31.12.2018").

dd.MM.yyyy is the format of every dates in my object.

How can I do that?

Test 1: string conversion -> empty field

Test 2:string conversion with date format -> today : 21.03.2018

Test 3: string direct to the date property -> 01.02.2001

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 30 at 10:46 PM

    Marina,

    See if this helps you out and did you try to look at your Transaction Property if it has an initial value area that you can modify to a constant value then any other update can be from a date rule?

    https://wiki.scn.sap.com/wiki/display/SAPMOB/Agentry+error+with+@DATE+rule

    @Date - This Agentry rule functions returns a date value or a date value of an argument if @Date (Arg) was given.

    Example:

    @Date
    |____Arg

    Arg - can be data type = Date or Integral Number (Representing # of days past our epoch date).

    Epoch date is normally something like = January 1st, 2001

    Another option that is used to do editing of format is @FROM_INTEGRAL_NUMBER - this Agentry function sets the context of its single parameter to a data type of integral number. It supports the decimal, integral number, string and property return types.

    Regards,

    Mark

    Add comment
    10|10000 characters needed characters exceeded

  • May 16 at 12:52 PM

    Try switching the day and month in the input to 12.31.2018

    The output you get 13.07.2041 if for an invalid date..

    Add comment
    10|10000 characters needed characters exceeded