Dave3765 Posted October 18, 2007 Share Posted October 18, 2007 Hey Guys, I'm trying to get a date to display in this format: 18TH OCT, 4:20PM The thing I can't do is shorten the month to just the first 3 letters . I have got the following code: $date = date("dS, F Y, g:i A"); echo('<span class="product_count_ver">' . $date . '</span>'); Which produces a date like this: 18th, October 2007, 9:10 PM Can anyone help? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/73862-solved-php-date-function-display-oct-instead-of-october/ Share on other sites More sharing options...
BlueSkyIS Posted October 18, 2007 Share Posted October 18, 2007 $date = date("dS M Y, g:i A"); Quote Link to comment https://forums.phpfreaks.com/topic/73862-solved-php-date-function-display-oct-instead-of-october/#findComment-372657 Share on other sites More sharing options...
Dave3765 Posted October 18, 2007 Author Share Posted October 18, 2007 Thanks again, BlueSky Quote Link to comment https://forums.phpfreaks.com/topic/73862-solved-php-date-function-display-oct-instead-of-october/#findComment-372660 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.