CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2005
    Location
    algiers, Algeria
    Posts
    132

    TIMESAMP into mysql

    Hi, i have TIMESTAMP column and i must convert his value in to date in mysql

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: TIMESAMP into mysql

    A timestamp column is already a date format. What exactly are you trying to do?
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Dec 2005
    Location
    algiers, Algeria
    Posts
    132

    Re: TIMESAMP into mysql

    how i can extract the month and year
    Last edited by ledaker; October 1st, 2008 at 02:39 PM.

  4. #4
    Join Date
    May 2002
    Posts
    10,943

    Re: TIMESAMP into mysql

    Since you haven't stated in what language you are attempting this, I will assume PHP.

    PHP Code:
    $row mysql_fetch_object($sql);
    $monthyear date('F Y'strtotime($row->timestamp)) 
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  5. #5
    Join Date
    Dec 2005
    Location
    algiers, Algeria
    Posts
    132

    Re: TIMESAMP into mysql

    thanks

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured