---
title: "PEXPIREAT"
url: "https://docs.yugabyte.com/stable/yedis/api/pexpireat/"
---

# PEXPIREAT

## Synopsis

**`PEXPIREAT key ttl-as-timestamp`**

PEXPIREAT has the same effect as EXPIREAT, but the Unix timestamp at which the key will expire is specified in milliseconds instead of seconds.

## Return value

Returns integer reply, specifically 1 if the timeout was set and 0 if key does not exist.

## Examples

```sh
$ SET yugakey "Yugabyte"
```

```
"OK"
```

```sh
$ PEXPIREAT yugakey 1555555555005
```

```
(integer) 1
```

```sh
$ PTTL yugakey
```

```
(integer) 18674452994
```

## See also

[`expireat`](/stable/yedis/api/expireat/ "expireat"), [`ttl`](/stable/yedis/api/ttl/ "ttl"), [`pttl`](/stable/yedis/api/pttl/ "pttl"), [`set`](/stable/yedis/api/set/ "set")
