SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist jazztie's Avatar
    Join Date
    Mar 2001
    Location
    the Netherlands
    Posts
    519
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    making a date???

    I want to save the date that something happens to a database in certain cases.

    For instance:

    if ($sid == '4') {
    $delete_date = 'current date';
    }

    $delete_date is used in a Update-statement later on.

    How can I make the date in the following format? ->
    28-02-2001 (dd-mm-yyyy)

    Please, please advise!

    Jazz

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    By using date() for the current date or mktime() for some date in the past or present.

    PHP Code:
    $datedate("d-m-Y"); 
    Please don't PM me with questions.
    Use the forums, that is what they are here for.


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
  •