Jump to content
KateMacwil

Format Date Not Working

Recommended Posts

Hi

I am would like to display the date as "Jan. 3, 2018" (example).
I have tried a few variations of trying to format my date field to the above and nothing is wokring for me.

		<?php
		$sEventDate = get_post_meta (get_the_ID(), "meta-text2", true);
   			
		if ($sEventDate)
		{
		     echo "<div style=font-size: 14px;'>Event Date: $sEventDate</div>";
		}
		else
		{
		     echo "<div style=font-size: 14px;'>Event Date: --</div>";
		}
		?>

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×