SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2005
    Location
    bahrain
    Posts
    553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up getting date from seconds

    hi
    i m using "strtotime("now");" function which will give me current time in seconds as 10 didgit value and then storing this in to database.

    now i want different operations by getting it from database like getting the full date with time,getting date and time of some days or some months back etc like this so on.......


    how can i implement several functions on this after getting this from database as a string of 10 digits.
    its urgent plzzz.....
    regards
    phphelp

  2. #2
    SitePoint Enthusiast Aarakast's Avatar
    Join Date
    Feb 2005
    Location
    Germany
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If I understood you question right, you want to format a date/time?

    If yes, you could use the funtion date().
    Greets,
    Pablo

    aarakast.de

  3. #3
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    151 Post(s)
    Tagged
    3 Thread(s)
    Why not just use the mysql function NOW() or current_date() in a date time defined table field?
    It would save a lot of messing about.
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....


Bookmarks

Posting Permissions

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