Skip to Content
0

Agentry Update Rules - Date Substring

May 09, 2017 at 12:10 AM

102

avatar image

Dear all,

I have a question on how to do a substring in Agentry Rules. I'm getting the below values from SAP, and I need just dates.

12:00:00 AM 5/12/2017

3:20:29 PM 12/12/2016

If I get the same number of length, I could able to substring (using MID function I guess), but I'm getting different format. So I need to write something like take everything after "M" (so it covers AM /PM) and return the rest of the string till end. Can you help me out in achieving this? Sorry for such dumb question.

Thanks,

Justin.

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

2 Answers

Best Answer
Bill Froelich
May 09, 2017 at 01:47 AM
0

If the value from SAP is a string you can use the DATETIME rule function to first parse the string into a date and then format it out as your desired date format.

--Bill

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks Bill.

0
avatar image
Former Member Jul 14, 2017 at 02:07 PM
0

Hi Justin,

Another workaround to acomplish this, you can extend your object class and send to agentry those values separated. If you see at your java code you will see that your are getting the values from two different sap fields but this values are getting concatenated at java code and sent to Agentry as one propety (DATEANDTIME)

Regards!

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks Ivan

0