Home > front end >  Covert numbered date to actual date
Covert numbered date to actual date

Time:05-12

How would you convert this date below into an actual date format?

1652122994

Desired output (for example):

2022-05-11

CodePudding user response:

You can do something like this...

<?php

    $timestamp=1652122994;

    echo gmdate("Y-m-d", $timestamp);

?>
  •  Tags:  
  • php
  • Related