Keys Expireat
# Redis Expireat Command
[!(#) Redis Keys](#)
The Redis Expireat command sets the expiration time for a key in UNIX timestamp format. After expiration, the key will no longer be available.
### Syntax
The basic syntax of the Redis Expireat command is as follows:
redis 127.0.0.1:6379> Expireat KEY_NAME TIME_IN_UNIX_TIMESTAMP
### Available Versions
>= 1.0.0
### Return Value
Returns 1 on success. Returns 0 when the key does not exist or cannot have its expiration time set (e.g., attempting to update the expiration time of a key in Redis versions earlier than 2.1.3).
### Example
First, create a key and assign a value:
redis 127.0.0.1:6379> SET tutorialkey redis OK
Set an expiration time for the key:
redis 127.0.0.1:6379> EXPIREAT tutorialkey 1293840000(integer) 1 redis 127.0.0.1:6379> EXISTS tutorialkey (integer) 0
[!(#) Redis Keys](#)
YouTip