Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder the-dream's Avatar
    Join Date
    Mar 2007
    Location
    Northamptonshire, UK
    Posts
    477
    Thanks
    8
    Thanked 4 Times in 4 Posts

    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

  • #2
    Senior Coder djm0219's Avatar
    Join Date
    Aug 2003
    Location
    Wake Forest, North Carolina
    Posts
    1,294
    Thanks
    4
    Thanked 203 Times in 200 Posts
    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

  • #3
    Regular Coder the-dream's Avatar
    Join Date
    Mar 2007
    Location
    Northamptonshire, UK
    Posts
    477
    Thanks
    8
    Thanked 4 Times in 4 Posts
    But, When i take it out of the db, i need to sort it, DESC according to date.

  • #4
    Senior Coder djm0219's Avatar
    Join Date
    Aug 2003
    Location
    Wake Forest, North Carolina
    Posts
    1,294
    Thanks
    4
    Thanked 203 Times in 200 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •