can I fetch in different format?

Discussion in 'PHP' started by haradeep, Nov 14, 2010.

  1. #1
    Hi,

    In mysql I'm using current time stamp to store date. this is the format stored 2010-11-14 03:40:56.

    Now I'm fetching this as it is. Can I change this format while fetching?
     
    haradeep, Nov 14, 2010 IP
  2. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #2
    ThePHPMaster, Nov 14, 2010 IP
  3. vaidikkp

    vaidikkp Peon

    Messages:
    72
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i dont think that is possible. I was also wondering once how to do that but couldn't find anything of that sort. So i created a parser for that. but the parser i created was for a date field. i would suggest you do that too. i would suggest you should write a function which retrurns each and every individual integral value (like day, month, year, hour, minute, etc.) in one array so that you can format it and use it as you want.
     
    vaidikkp, Nov 14, 2010 IP
  4. haradeep

    haradeep Well-Known Member

    Messages:
    231
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #4
    Thank you,

    I will try it.

    function which retrurns each and every individual integral value (like day, month, year, hour, minute, etc.) in one array so that you can format it and use it as you want.


     
    haradeep, Nov 14, 2010 IP