Epoch seconds to readable date/time

I have a cert and would like to show the expiration date, similar to the code below.
The expiration field is in epoch seconds, so I would expect it to be something similar.

output "mycert_expires" {
  value = formatepochdate("YYYY-MM-DD", vault_pki_secret_backend_cert.mycert.expiration)
}

terraform doesnt have a native function to convert in epoch format. But with provider fuctions you can use a format unix using hashicorp’s time provider .