Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Entitlement End date update Enhanced Query Execution

Raghu
Valued Contributor III
Valued Contributor III

Hi Team,

Am not able to update entitlement end date can you confirm which format it allow.

 

Enhanced Query Execution:

select '05-09-2024' as account_entitlements1__ENDDATE,a.ACCENTKEY as account_entitlements1__primarykey from account_entitlements1 a where a.ENTITLEMENT_VALUEKEY='xxx' and a.accountkey=xxx

tried : 05-09-2024,09-05-2024,05-09-2024 07:30:47,10-09-2024 07:30:47

it is possible to update backed ?

 

 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.
5 REPLIES 5

PremMahadikar
Valued Contributor
Valued Contributor

Hi @Raghu ,

Try this

  • If the end date falls in future

 

select date(now() + Interval 5 day) as account_entitlements1__ENDDATE,a.ACCENTKEY as account_entitlements1__primarykey from account_entitlements1 a where a.ENTITLEMENT_VALUEKEY=<entitlementkey> and a.accountkey=<accountkey>

 

  • If you want end date to be the past 

 

select date(now() - Interval 5 day) as account_entitlements1__ENDDATE,a.ACCENTKEY as account_entitlements1__primarykey from account_entitlements1 a where a.ENTITLEMENT_VALUEKEY=<entitlementkey> and a.accountkey=<accountkey>

 

This is working!

If this answers your question, please consider selecting Accept As Solution and hit Kudos

Raghu
Valued Contributor III
Valued Contributor III

@PremMahadikar  we have requirement specific date need to update? getting incorrect date.

date function we tried already have mutiple account we need to update all, we can't update manually function + value any alternative ?


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

itinjic
Regular Contributor
Regular Contributor

In Saviynt, the entitlement end date should be in the format 'YYYY-MM-DD'. Based on your query, it seems that you are using the format 'DD-MM-YYYY'.

Please try updating the query with the correct format as shown below:

```
sql select '2024-09-05' as account_entitlements1__ENDDATE, a.ACCENTKEY as account_entitlements1__primarykey from account_entitlements1 a where a.ENTITLEMENT_VALUEKEY = 'xxx' and a.accountkey = 'xxx'
```
Make sure to replace 'xxx' with the appropriate values for 'ENTITLEMENT_VALUEKEY' and 'accountkey'. This query should update the entitlement end date accordingly.

If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Raghu
Valued Contributor III
Valued Contributor III

I got the solution Thank you..!

select STR_TO_DATE('05-12-2024', '%m-%d-%Y') as account_entitlements1__ENDDATE,a.ACCENTKEY as account_entitlements1__primarykey from account_entitlements1 a where a.ENTITLEMENT_VALUEKEY='XXXX' and a.accountkey=XXX


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

PremMahadikar
Valued Contributor
Valued Contributor

Hi @itinjic ,

Yes, this is the right format - YYYY-MM-DD

All the above solution works!