Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Entitlement End date update Enhanced Query Execution

Raghu
All-Star
All-Star

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
All-Star
All-Star

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

@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.

Sapere aude

Raghu
All-Star
All-Star

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
All-Star
All-Star

Hi @itinjic ,

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

All the above solution works!