Results 1 to 8 of 8

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Eclipse Plugin Developer aphex's Avatar
    Join Date: Mar:2003
    Location: Karlsruhe
    Posts: 546

    Question MySQL: Text Date

    , Text (Wed Apr 16 02:16:09 CEST 2008). Date ?
    We are drowning in information, but starving for knowledge and time!

  2. #2
    Registered User
    Join Date: Oct:2003
    Location:
    Posts: 4,317

  3. #3
    hmm BornToDrink's Avatar
    Join Date: Aug:2005
    Location: .
    Posts: 11,573
    , php :
    Code:
    <?
    $date = "Wed Apr 16 02:16:09 CEST 2008";
    echo date("Y.m.d", strtotime($date));
    ?>
    Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
    .

  4. #4
    Eclipse Plugin Developer aphex's Avatar
    Join Date: Mar:2003
    Location: Karlsruhe
    Posts: 546
    . , Wed Apr 16 02:16:09 CEST 2008 . Date. T .
    We are drowning in information, but starving for knowledge and time!

  5. #5
    The Lord of the Death altoas's Avatar
    Join Date: Jun:2006
    Location: varna
    Posts: 315
    unixtime?

  6. #6
    Eclipse Plugin Developer aphex's Avatar
    Join Date: Mar:2003
    Location: Karlsruhe
    Posts: 546
    unixtime. , Date. BornToDrink .
    We are drowning in information, but starving for knowledge and time!

  7. #7
    hmm BornToDrink's Avatar
    Join Date: Aug:2005
    Location: .
    Posts: 11,573
    , ( )
    mysql , - .
    Code:
    <?
    $sql = mysql_query("select `id`, `date` from `table`");
    while ($date = mysql_fetch_array($sql)) 
    {
    	mysql_query("update `table` set `date` = '".date("Y.m.d", strtotime($date['date']))."' where `id` = '".$date['id']."'");
    }
    ?>
    Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
    .

  8. #8
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    :

    UPDATE `table` SET `dates1`=STR_TO_DATE(`dates_now`, 'my_format_here')

    dates1 DATETIME, .
    'my_format_here' , , , .
    '%a %b %d %T ? %Y', CEST, .
    DATETIME mysql, date/time - PHP.
    (dates_now).

Posting Permissions

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

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |