Ezilon.com - Target Your Audience, be Seen in Your Region

European Date - How do I cahnge $date.............

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

They have: 10 posts

Joined: May 1999

Hi,

just can't remember how I change from the servers US date format to EU date like day, month, year. I have it like this now;
$date = `date +"%B %d, %A, %Y"`;
chop($date);
$shortdate = `date +"%D"`;
chop($shortdate);

It's just a blackhole in my head right now, help needed.

Thanks.

Ok, the blackhole is no longer a hole it's filled. I suddenly came back to the living live, it should be like this;

$shortdate = `date +"%e, %b, %Y"`;
chop($shortdate);

Enjoy...

Peder L.

They have: 4,727 posts

Joined: Jan 1970

if you get the time and date with localtime you can split up that string by splitting on " ".Then you can simply create a new date string by adding the elements od the date array in the right order.

Hope this helps,

Malte

----------
Malte Ubl - [red]Germany[/red] - http://goKewl.com/
[red]The beats of 1000 hearts inside...[/red] the merciless pulsation... [red]and all I know is I'll be back...[/red] back to trance nation!

They have: 10 posts

Joined: May 1999

Malte,

thanks, but it works as I want it as I stated above, the only thing was that I wrote it slightly incorrect above. It should be like this;
$shortdate = `date +"%d/%m/%y"`;
chop($shortdate);

I just put commas when I posted by habit.

Have a good one....

Peder L.