---
title: "PTTL"
url: "https://docs.yugabyte.com/stable/yedis/api/pttl/"
---

# PTTL

## Synopsis

**`PTTL key`**

Similar to TTL this command returns the remaining time to live of a key that has a timeout set, with the sole difference that TTL returns the amount of remaining time in seconds while PTTL returns it in milliseconds.

## Return value

Returns TTL in milliseconds, encoded as integer response.

## Examples

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

```
"OK"
```

```sh
$ EXPIRE yugakey 10
```

```
(integer) 1
```

```sh
$ PTTL yugakey
```

```
(integer) 9995
```

## See also

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