Get the Year/Month/Day from a datetime in php?

前端 未结 3 630
忘掉有多难
忘掉有多难 2021-01-31 06:57

I used date(\'w\', timestamp) and date(\'w\', timestamp) to know the day, date(\'n\', timestamp) for months, etc.

Now I\'m using d

3条回答
  •  暖寄归人
    2021-01-31 07:32

    Check out the manual: http://www.php.net/manual/en/datetime.format.php

    format('Y-m-d H:i:s');
    ?>
    

    Will output: 2000-01-01 00:00:00

提交回复
热议问题