Outputting dates in a format other than "yyyy-mm-dd"?

Forum
Last Post
Threads / Messages

Quillink

Member
Member
Joined
Dec 18, 2008
Messages
93
Points
0
Mysidian Dollar
7,188
How can I export a column of dates in the format "yyyy-mm-dd" (e.g. 2010-01-27) in a format such as "27 Jan, 2010"?

Thanks again in advance :)
 
I redid the dates to make them use the time() unix timestamp, as you can then echo them as is wished. :D I don't know how to do it that way, but I know there is a way... Just need to remember how. xD
 
Quillink said:
How can I export a column of dates in the format "yyyy-mm-dd" (e.g. 2010-01-27) in a format such as "27 Jan, 2010"?

Thanks again in advance :)

This example comes directly from http://php.net/manual/en/function.date.php

PHP:
<?php
// Assuming today is March 10th, 2001, 5:16:18 pm, and that we are in the
// Mountain Standard Time (MST) Time Zone

$today = date("F j, Y, g:i a");                 // March 10, 2001, 5:16 pm
$today = date("m.d.y");                         // 03.10.01
$today = date("j, n, Y");                       // 10, 3, 2001
$today = date("Ymd");                           // 20010310
$today = date('h-i-s, j-m-y, it is w Day');     // 05-16-18, 10-03-01, 1631 1618 6 Satpm01
$today = date('\i\t \i\s \t\h\e jS \d\a\y.');   // it is the 10th day.
$today = date("D M j G:i:s T Y");               // Sat Mar 10 17:16:18 MST 2001
$today = date('H:m:s \m \i\s\ \m\o\n\t\h');     // 17:03:18 m is month
$today = date("H:i:s");                         // 17:16:18
?>
 
But will those work with any dates I've recorded or just with the current day?
Meh, I'll test it anyway after I've finished this script. Need to keep my head in one place at a time. :S
 
Quillink said:
But will those work with any dates I've recorded or just with the current day?
Meh, I'll test it anyway after I've finished this script. Need to keep my head in one place at a time. :S

It doesn't have to be today. That's just an example I think. The link has more information. I am not an expert, but that example helped me.
 
Quilink .. Contact Zami on PGS when you are fully active again to get promo & get nursery. We had removed the link when you were inactive for so long but nursery is still there when you are ready.
 
Thanks, and I would have removed the link too if I were admin. ;)

I'm really trying hard this time to bottleneck the outgoing images from my site this time. I want to try and avoid clicks from already registered users and try and focus on the potential market. I learnt a lot the last time round (which hereforth will be referred to as "beta 1", lol), mostly that click gathering sites such as Yarolds are not your friend if you're looking to gain users.

I'd like to say I'm not in it for the money, but everyone needs to cover expenses! :)

That's why this time I'm going to go straight to big audiences (MySpace and FaceBook if all goes to plan). I want to get a nice cushion of cash to keep the server going, and my userbase's convieniences have to come second unfortunately.


Woah, I think I went off topic a bit there. My point is that I may or may not register my site to your services. It's nothing personal, just that paying $200 a month is never fun so I'd like to reduce the expenses as much as I can. ;)
 
Similar threads
Thread starter Title Forum Replies Date
AlexC Can I format things differently depending on the layout? Questions and Supports 2

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,130
Members
1,603
Latest member
Monako
BETA

Latest Threads

Latest Posts

Top