Help to year ,month and Day code!, .

Started on the old forum in June 2011 · view the original in the archive · old links redirect here

12 replies · 878 views · started 15 years ago · 1 min read

4 participants
youdi3 Junior · 42 posts #1

Hi guys can anyone post the code of year,month and day here.?. the format is looks like this . .:)

Saturday 18 - June - 2011

🙂

demo http://3zone.tk 😠

CreativityKills Lead · 833 posts #4

youdi3 wrote: Hi guys can anyone post the code of year,month and day here.?. the format is looks like this . .:)

Saturday 18 - June - 2011

:)

you can never learn anything in php if small things like these elude you, go and freaking read and stop being lazy :-/

youdi3 Junior · 42 posts #5

i,m newbie in php. .so that i ask if what the code i try 2 find here but ididnt see so dnt say lazy. .i know u are the good coder so all know the simple thing like this .

so that i ask bEcouse i dont know . . .i never ask if i know what the answer dud🥷

demo http://3zone.tk 😠

FrOsT-BiTe #6

use this one ...

$time=date("l, d F Y -h:i:s a");
echo "$time";

Output will be > Saturday, 18 June 2011 - 05:00:16 pm

CreativityKills Lead · 833 posts #7

youdi3 wrote: i,m newbie in php. .so that i ask if what the code i try 2 find here but ididnt see so dnt say lazy. .i know u are the good coder so all know the simple thing like this .

so that i ask bEcouse i dont know . . .i never ask if i know what the answer dud🥷

fair enough but truthfully newbie or not, php has a documentation with waaay more info than you can get here at http://php.net all you have to do is read it. They have it in many languages too 🙂 u shud try it, challenge urself.

youdi3 Junior · 42 posts #8

ok tnx jgutz / FrOsT-BiTe and also tnx CreativityKills . .this tread is done:)

demo http://3zone.tk 😠

mobidev Senior · 312 posts #9

Ok here something else I'm trieng in my guestbook. I guess it showimg server time but I want my own time.

$datum = gmdate("l,d M Y"); $zeit = gmdate("H:i:s A",time()+(25200));

Should I change the (25200) or leave that be,,, I tried editing it with a wappychat config file for the time as I'm used to edit the server time with my wappychat to my local time but it gave me errors when I did???

CreativityKills Lead · 833 posts #12
date_default_timezone_set( 'Africa/Johannesburg' );
date( 'l, d M Y - g:ia' );

// OR
$tz = new DateTimeZone('Africa/Johannesburg');
$date = new DateTime($tz);
echo $date->format( 'l, d M Y - g:ia' );

read read read read 🙂

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close