Jump to content

php Output date


computermax2328

Recommended Posts

Hello Again,

 

I am building a blog and for every time I post in my database I have an auto time stamp that is attached to every entry. When I output the date and time just as a variable I get Y-m-d. Then I tried to use date_format() command. Now I am getting a blank. How can I rearrange my $date variable to the format I need?

 

This is what I used:

 $date = $row['Date'];
$date = date_format("m/d/Y", $date);

Link to comment
https://forums.phpfreaks.com/topic/267159-php-output-date/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.