Jump to content

Archived

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

unemployment

Format Date

Recommended Posts

I can't seem to get the syntax correct

 

I want my date outputted as January 1st.

 

<span class="goal_head f_right mrm"><?php echo date($goal['complete_date'], 'F j'); ?></span>

Share this post


Link to post
Share on other sites

echo date('F jS');

 

this woudn't use the timestamp that OP has retrieved from the database. This would simply print the current date. As TLG said, OP simply needs to reverse his parameters. He has them in the wrong order. Like so:

<span class="goal_head f_right mrm"><?php echo date('F j', $goal['complete_date']); ?></span>

Share this post


Link to post
Share on other sites

and then can add the S so can have the way asked for

 

correct

Share this post


Link to post
Share on other sites

×

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.