Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2007
    Posts
    179
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Exclamation formatting Localtime()

    this is the normal format of the localtime()
    yyy-ddd-mm hh:nn:ss
    *n=minutes

    that is the format i need
    dd/mm/yyyy hh:nn:ss

    i need to format into the following format and use it inside of query
    select ... from... where time < newformat( localtime() )

    how can i achieve the format i need?
    By the time u recognize this moment, This moment will be gone.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    date_format()?
    But to make a comparison/ sorting, i think you may have to do it in default mysql format.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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