Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 01-27-2010, 05:21 AM
Quillink Quillink is offline
Member
 
Join Date: Dec 2008
Posts: 93
Credits: 11,320
Quillink
Default Outputting dates in a format other than "yyyy-mm-dd"?

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 :)
Reply With Quote
  #2  
Old 01-28-2010, 10:45 AM
Arianna's Avatar
Arianna Arianna is offline
Dev Staff
 
Join Date: Sep 2009
Posts: 334
Gender: Female
Credits: 21,370
Arianna will become famous soon enough
Default RE: Outputting dates in a format other than "yyyy-mm-dd"?

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
Reply With Quote
  #3  
Old 01-28-2010, 07:26 PM
arlecchina arlecchina is offline
Member
 
Join Date: Feb 2009
Posts: 65
Credits: 3,608
arlecchina
Default RE: Outputting dates in a format other than "yyyy-mm-dd"?

Quote:
Originally Posted by Quillink
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 Code:
<?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
?>
Reply With Quote
  #4  
Old 01-28-2010, 09:49 PM
Quillink Quillink is offline
Member
 
Join Date: Dec 2008
Posts: 93
Credits: 11,320
Quillink
Default RE: Outputting dates in a format other than "yyyy-mm-dd"?

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
Reply With Quote
  #5  
Old 01-29-2010, 01:09 AM
arlecchina arlecchina is offline
Member
 
Join Date: Feb 2009
Posts: 65
Credits: 3,608
arlecchina
Default RE: Outputting dates in a format other than "yyyy-mm-dd"?

Quote:
Originally Posted by Quillink
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.
Reply With Quote
  #6  
Old 01-29-2010, 01:21 AM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 15,631
Seapyramid
Default RE: Outputting dates in a format other than "yyyy-mm-dd"?

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.
Reply With Quote
  #7  
Old 01-29-2010, 11:47 AM
Quillink Quillink is offline
Member
 
Join Date: Dec 2008
Posts: 93
Credits: 11,320
Quillink
Default RE: Outputting dates in a format other than "yyyy-mm-dd"?

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. ;)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I format things differently depending on the layout? AlexC Questions and Supports 2 04-09-2011 07:11 PM


All times are GMT -5. The time now is 01:26 PM.

Currently Active Users: 9621 (0 members and 9621 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636