Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Posts
    20

    Unanswered: Converting to custom date format

    I have what I hope is a simple question.

    I need to convert date inputs in a Date/Time field to format

    8 December 2007

    The field still must be Date/Time format so as to allow users to enter in the format 8/12/07 (keeping in mind I'm an Aussie so we go by dd/mm/yy)!!

    Thanks!

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    SELECT FORMAT(yourdate, 'd MMMM yyyy') AS display_date FROM ...
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Oct 2007
    Posts
    20
    Thanks very much for that.

    This might sound like a really stupid question, but where does this code go?

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    part of any query (the SELECT statement)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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