# Available options for controlling the expiry date of a license

**Applies to:**

QLM Pro and QLM Enterprise.

QLM: 8.0 or higher.

***

When specifying the expiry date criteria of a license, you can configure two settings:

* Expires \<x> days after install&#x20;
* Expires on \<date>

![mceclip0.png](https://support.soraco.co/hc/article_attachments/4402233002132/mceclip0.png)

&#x20;

If you configure both settings, the license will expire when either setting's criterion is met.

If you configure a duration-based expiry and select to expire the license x days after installation, the actual expiry date is controlled by two [server properties](/docs/qlm-license-server/server-properties.md):&#x20;

&#x20;

<table data-header-hidden><thead><tr><th width="382"></th><th></th></tr></thead><tbody><tr><td>useDurationToSetExpiryDate</td><td>When creating an Activation Key with an expiry duration, the QLM License Server converts the specified duration to a specific expiry date based on the current date. The SubscriptionExpiryDate field will be set to this expiry date.<br><br></td></tr><tr><td>useDurationToSetExpiryDateWhenActivating</td><td>When activating a duration based license, the QLM License Server can convert the specified duration to a specific expiry date based on the time of activation. The SubscriptionExpiryDate field will be set to this expiry date.</td></tr></tbody></table>

&#x20;

If both server properties are unchecked, no specific expiry date will be set. The license expiry date will be based on the first time a license is validated on a user's machine. **This setting is not recommended as it is less secure.**

Examples:

| **Expiry Criteria** | **Creation Date** | **Activation Date** | **useDurationToSetExpiryDate** | <p><strong>useDurationToSet</strong></p><p><strong>ExpiryDateWhenActivating</strong></p> | **Actual Expiry Date**        |
| ------------------- | ----------------- | ------------------- | ------------------------------ | ---------------------------------------------------------------------------------------- | ----------------------------- |
| 30 days             | 2021-01-01        | 2021-01-15          | True                           | True                                                                                     | 2021-01-31                    |
| 30 days             | 2021-01-01        | 2021-01-15          | True                           | False                                                                                    | 2021-01-31                    |
| 30 days             | 2021-01-01        | 2021-01-15          | False                          | True                                                                                     | 2021-02-15                    |
| 30 days             | 2021-01-01        | 2021-01-15          | False                          | False                                                                                    | Not Set - **Not recommended** |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.soraco.co/docs/faq/available-options-for-controlling-the-expiry-date-of-a-license.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
