Forum Moderators: coopster

Message Too Old, No Replies

getting the proper date format

         

Dexie

2:29 pm on Jul 19, 2005 (gmt 0)

10+ Year Member



Hi all, Did this before, but it looks as though it diapeared somewhere? Can anyone help me get a php script, to show for example:

Tuesday, the 19th of July, 2005

coopster

3:16 pm on Jul 19, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



This one?

[webmasterworld.com...]

Here you go ;)

echo date("l, \\t\he dS of F, Y");

Dexie

6:26 pm on Jul 19, 2005 (gmt 0)

10+ Year Member



Many thanks for that my friend.

The other thread was for a date and time to the last half-hour, but this one would just be the current day and date.

THe code that you kindly put forward below - do I put anything before it all?

echo date("l, \\t\he dS of F, Y");

Also, is there any way that I can quickly do a search of *just* the php forum on WebmasterWorld please?

Dexie.

coopster

6:43 pm on Jul 19, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Put anything before it? Well, "echo" will print it out. If you want to assign it to a variable you can do that as well.

Searching? Here are some tips ...

FAQ: Additional Search Tools for WebmasterWorld [webmasterworld.com]
Welcome to WebmasterWorld! [webmasterworld.com]

Dexie

7:00 pm on Jul 19, 2005 (gmt 0)

10+ Year Member



I'm new to this, (and it isn't needed for printing, just viewing), are you saying that the *complete* code would be :

<?php

echo date("l, \\t\he dS of F, Y");
?>

Dexie

7:06 pm on Jul 19, 2005 (gmt 0)

10+ Year Member



On the search thingie, I already use the search facility on Google for WebmasterWorld, but would like to define it a little, *just* to search forum number 88 - any ideas?

coopster

7:17 pm on Jul 19, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Yeah, if you throw that script out there and open it in your browser it should display the date in a format you expect.

To search over forum88 only? Hmmm ... throw the word "PHP" in the keyword list ;)

Dexie

7:32 pm on Jul 19, 2005 (gmt 0)

10+ Year Member



I'll give that code a try - thanks.

For the search, I thought that might have been a syntax, just to search this forum?

sned

8:09 pm on Jul 19, 2005 (gmt 0)

10+ Year Member



What about adding something like [inurl:forum88] to your google search (if you just want to search this section) .. I think that might do the trick.

-sned

Dexie

7:33 am on Jul 20, 2005 (gmt 0)

10+ Year Member



Cheers Sned, I'll give that a shot as well ;-)

Dexie

11:11 am on Jul 22, 2005 (gmt 0)

10+ Year Member



Many thanks Coopster, just tried the code, it works a treat. Much appreciated.

Dexie.

Dexie

7:01 am on Aug 1, 2005 (gmt 0)

10+ Year Member



Hi Coopster,

Just looked at the code for today and it gives:

Monday, the 01st of August, 2005,

any ideas how I get rid of that zero at all please?

Dexie.

chrisjoha

12:59 pm on Aug 1, 2005 (gmt 0)