European Date - How do I cahnge $date.............
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.
Anonymous posted this at 02:08 — 18th August 1999.
They have: 5,633 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!
inet posted this at 00:31 — 19th August 1999.
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.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.