# 设置时间范围

* [DateEquals](https://iam.cloudcopilot.io/resources/operators/DateEquals)
* [DateEqualsIfExists](https://iam.cloudcopilot.io/resources/operators/DateEqualsIfExists)
* [DateGreaterThan](https://iam.cloudcopilot.io/resources/operators/DateGreaterThan)
* [DateGreaterThanIfExists](https://iam.cloudcopilot.io/resources/operators/DateGreaterThanIfExists)
* [DateGreaterThanEquals](https://iam.cloudcopilot.io/resources/operators/DateGreaterThanEquals)
* [DateGreaterThanEqualsIfExists](https://iam.cloudcopilot.io/resources/operators/DateGreaterThanEqualsIfExists)
* [DateLessThan](https://iam.cloudcopilot.io/resources/operators/DateLessThan)
* [DateLessThanIfExists](https://iam.cloudcopilot.io/resources/operators/DateLessThanIfExists)
* [DateLessThanEquals](https://iam.cloudcopilot.io/resources/operators/DateLessThanEquals)
* [DateLessThanEqualsIfExists](https://iam.cloudcopilot.io/resources/operators/DateLessThanEqualsIfExists)
* [DateNotEquals](https://iam.cloudcopilot.io/resources/operators/DateNotEquals)
* [DateNotEqualsIfExists](https://iam.cloudcopilot.io/resources/operators/DateNotEqualsIfExists)

### DateLessThan

`DateLessThan` compares a datetime in a request to a datetime in your policy. Datetime comparisons compare down to the second; so any value one second before the date in your policy will match the DateLessThan condition.

To match a request, the context key must exist in the request and must match the datetime in your policy.

You can NOT use policy variables in the value of this operator.

\
DateLessThan in an Allow Statement

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td>Policy Condition</td><td>Request Context</td><td>Result</td></tr><tr><td><pre data-overflow="wrap"><code>"DateLessThan": {
  "aws:CurrentTime": "2011-05-03T00:00:00Z"
}
</code></pre></td><td><code>aws:CurrentTime: null</code></td><td><img src="https://iam.cloudcopilot.io/_astro/unknown.4jslFilM_ZFyvUV.svg" alt="Not Allowed"> Not AllowedStatement does not apply</td></tr><tr><td><pre data-overflow="wrap"><code>"DateLessThan": {
  "aws:CurrentTime": "2011-05-03T00:00:00Z"
}
</code></pre></td><td><code>aws:CurrentTime: 2011-05-02T23:59:59Z</code></td><td><img src="https://iam.cloudcopilot.io/_astro/allow.BKwnWDMp_Z2m9B7U.svg" alt="Allowed"> AllowedAssuming no explicit Deny elsewhere</td></tr><tr><td><pre><code>"DateLessThan": {
  "aws:CurrentTime": "2011-05-03T00:00:00Z"
}
</code></pre></td><td><code>aws:CurrentTime: 2011-05-03T00:00:00Z</code></td><td><img src="https://iam.cloudcopilot.io/_astro/unknown.4jslFilM_ZFyvUV.svg" alt="Not Allowed"> Not AllowedStatement does not apply</td></tr><tr><td><pre><code>"DateLessThan": {
  "aws:CurrentTime": "2011-05-03T00:00:00Z"
}
</code></pre></td><td><code>aws:CurrentTime: 2011-05-03T00:00:01Z</code></td><td><img src="https://iam.cloudcopilot.io/_astro/unknown.4jslFilM_ZFyvUV.svg" alt="Not Allowed"> Not AllowedStatement does not apply</td></tr></tbody></table>


---

# 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://aws-gcr-wwso-security.gitbook.io/an-quan-zui-jia-shi-jian/1.-iam-shen-fen-shi-bie-yu-fang-wen-kong-zhi/xin-shou-qi-bu/ru-he-xie-condition/she-zhi-shi-jian-fan-wei.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.
