SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: showdate qn

  1. #1
    SitePoint Enthusiast nixon's Avatar
    Join Date
    May 2003
    Location
    Australia
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    showdate qn

    Hi,
    I was using something like this ".showdate($date)." to present a date from a field (this worked fine). I had to change to something like this $row[date] to present in a different format but now I can't get it to show the date. It just shows the string of 10 digits that is in the table field. I know I need to use something like "showdate" in there somewhere but I just can't work out where. Any help appreciated.

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,806
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    What date format are you using?
    eg unix timestamp, date(); now()?
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    SitePoint Enthusiast nixon's Avatar
    Join Date
    May 2003
    Location
    Australia
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am using this. Hope it helps.
    function showdate($timestamp) {
    if (!$timestamp == 0) {
    return $showdate = date('D', $timestamp)."
    ".date('d-M-Y', $timestamp);


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
  •