Time convertion
Moderator: General Moderators
Time convertion
Hi, I am try to convert this : Thu, 12 Jan 2012 11:18:06 +0100 to something more neat and short like 12.01.2012 for my website. I tried doing some research, but I'm stuck. Help is much appreciated.
Re: Time convertion
I use
Now if you notice, I use a comma after the day to make the date more normal
you could use the period easy
easy once you have the a couple of code snippets to look at
Code: Select all
date ("F d, Y (H:i:s)", getlastmod());you could use the period easy
Code: Select all
date("F.d.Y")Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Time convertion
Try:jonas89 wrote:Hi, I am try to convert this : Thu, 12 Jan 2012 11:18:06 +0100 to something more neat and short like 12.01.2012 for my website. I tried doing some research, but I'm stuck. Help is much appreciated.
Code: Select all
$timestamp = strtotime('Thu, 12 Jan 2012 11:18:06 +0100');
echo date('m.d.Y', $timestamp);(#10850)
Re: Time convertion
Wicked, it worked perfectly Christopher