Skip to content
February 5, 2009 / ranacse05

Make timestamp more readable


Hello guys , this post for the newbie .Ofter we need to store the current time using mysql NOW() , but when later we want to print that we get 2009-02-05 19:02:49 .

But using a single line we can make that like 05 Feb, 2009 .

<?
	echo date("d M, Y",strtotime($date)); 
        // Here $date is the timestamp value from the database .
?>
	

Handy code hun ?

Advertisements

2 Comments

Leave a Comment
  1. Omaira / Mar 3 2009 6:40 am

    Just dropping by.Btw, you website have great content!

    ______________________________
    Start Getting Paychecks For Easy Work That Fits Your Schedule, No Experience Required.

  2. saiful103a / Jul 2 2009 10:34 pm

    good tips, that will work for me.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: