tags:

views:

29

answers:

1

Hello,

The PHP code below returns dates in this format:

July 27, 2010 7:36 pm

How could I make it return dates with capital letters? Here's what I want;

JULY 27, 2010 7:36 PM

Thanks in advance,

John

The PHP code:

format('F j, Y &\nb\sp &\nb\sp g:i a')
+3  A: 

The strtoupper() function converts all the characters in a string to uppercase. You can use it in the following way:

strtoupper(format('F j, Y &\nb\sp &\nb\sp g:i a'));

If you have having problems with the spaces, remember that it's  . Inserting capitals there might not work either. You could try the following:

strtoupper(format('F j, Y'))."  ".strtoupper(format('g:i a'));
Sam152
John