Results 1 to 5 of 5

Thread: date and time

  1. #1
    Join Date
    Aug 2008
    Posts
    3

    Question Unanswered: date and time

    Hi

    how database can be printed by some date and time colmun it has?

    I need to print it in PHP in the following way: 23/05/08 13:23

    Thanks
    Last edited by alabama; 08-04-08 at 05:10.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    look at the format functions such as printf or sprintf in PHP. there are similar functions within MySQL but I wouldn't recommend you using those as in my books its plain wrong to format at the SQL level as you never know how you want to use the data in the application.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Aug 2008
    Posts
    3

    update query

    Thank you.
    BTW, which books are you talking about?

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    that was just a figure of speech, an expression, meaning "in my opinion"

    http://idioms.thefreedictionary.com/in+my+book
    http://www.usingenglish.com/referenc...n+my+book.html

    and i agree, it is always better to format the date in the application
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Aug 2008
    Posts
    3
    oo I'm so stupid
    Thank you again

Posting Permissions

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