await redis.hset("my-key", "my-field", "my-value"); await redis.hexpireat("my-key", "my-field", Math.floor(Date.now() / 1000) + 10); const expireTime = await redis.hexpiretime("my-key", "my-field"); console.log(expireTime); // e.g., [1697059200]
Retrieves the expiration time of field(s) in a hash in seconds.
-2
-1
Was this page helpful?