cancel
Showing results for 
Search instead for 
Did you mean: 

How to get date from a Date and time property in Agentry rules?

sudhiranjan_lenka
Contributor
0 Kudos

Hello All,

I have a date and time type property in one of my Agentry object, I need to extract the date from the Date and Time field in one of my rule.

Could you please guide me to achieve this?

Thanks,

Sudhir.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member208808
Active Participant

Hi Sudhir,

I would write such rule as one of follows.

1)

DATE

DATE_AND_TIME

CustomObjectDateAndTimeProp

OR

2)

LEFT

DATE_AND_TIME

CustomObjectDateAndTimeProp

10

do let know if any of this suits your requirement ?

mark_pe
Active Contributor

AK,

Thanks for sharing and being part of this community. We appreciate all suggestions and comments.

Regards,

Mark

0 Kudos

As AK said, the most simplest way to extract date from DATE and TIME property is to use the following combination of rules:

the returned value will be String for instance "01.12.2020".

mark_pe
Active Contributor
0 Kudos

Sudhir,

Most of our Agentry rules are defined in the SAP documentation.

With respect to the Date and Time property, it states: The DATE_AND_TIME function returns either the current system date and time of the client device, or the date and time value specified as an optional parameter to the function. The function can also take an optional format parameter when called in a string context. The function supports the integral number, decimal number, and string return types.

Here is the link to the documentation:

https://help.sap.com/doc/saphelp_smp307sdk/3.0.6/en-US/7c/170a9370061014b6fb8e58e1217e5a/frameset.ht...

An example of this is in Work Manager for some time update rules (the actual field just returns the value). If you want to use the Date_AND_TIME the syntax is in the link above.

Regards,

Mark