Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-13-2008, 12:33 PM   PM User | #1
the-dream
Regular Coder

 
the-dream's Avatar
 
Join Date: Mar 2007
Location: Northamptonshire, UK
Posts: 477
Thanks: 8
Thanked 4 Times in 4 Posts
the-dream can only hope to improve
RFC 2822 formatted date in MySQL

Is there a column type in MySQL that accepts dates in the RFC 2822 date format.

//AKA
date('r');

» RFC 2822 formatted date Example: Thu, 21 Dec 2000 16:01:07 +0200
__________________
Branchr Advertising Network
the-dream is offline   Reply With Quote
Old 08-13-2008, 01:39 PM   PM User | #2
djm0219
Senior Coder

 
djm0219's Avatar
 
Join Date: Aug 2003
Location: Wake Forest, North Carolina
Posts: 1,229
Thanks: 2
Thanked 190 Times in 188 Posts
djm0219 is on a distinguished road
There isn't a date format that will but you could simply store it in a varchar column.
__________________
Dave .... HostMonster for all of your hosting needs
djm0219 is offline   Reply With Quote
Old 08-13-2008, 04:10 PM   PM User | #3
the-dream
Regular Coder

 
the-dream's Avatar
 
Join Date: Mar 2007
Location: Northamptonshire, UK
Posts: 477
Thanks: 8
Thanked 4 Times in 4 Posts
the-dream can only hope to improve
But, When i take it out of the db, i need to sort it, DESC according to date.
__________________
Branchr Advertising Network
the-dream is offline   Reply With Quote
Old 08-13-2008, 05:18 PM   PM User | #4
djm0219
Senior Coder

 
djm0219's Avatar
 
Join Date: Aug 2003
Location: Wake Forest, North Carolina
Posts: 1,229
Thanks: 2
Thanked 190 Times in 188 Posts
djm0219 is on a distinguished road
Then you'll need to parse out the actual date and time, convert it to a Unix style timestamp and store it that way if you want to be able to manipulate/retrieve it in a specific order.
__________________
Dave .... HostMonster for all of your hosting needs
djm0219 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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


All times are GMT +1. The time now is 12:11 AM.


Advertisement
Log in to turn off these ads.