Results 1 to 4 of 4

Thread: Small SQL help

  1. #1
    Join Date
    Dec 2003
    Posts
    14

    Unanswered: Small SQL help

    how do we convert YYYY-MM-DD format to Mon.,dd,yy format?
    2004-14-04 to Apr.,14,04

  2. #2
    Join Date
    Apr 2004
    Location
    Inside Intel
    Posts
    165

    Talking DB2 date functions


  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    There is no built-in SQL function to do that. You might look at the supplied DB2 functions or write one yourself. You would probably need the CASE statement.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Quote Originally Posted by mark_tim1999
    how do we convert YYYY-MM-DD format to Mon.,dd,yy format?
    2004-14-04 to Apr.,14,04
    Use the DAY(), YEAR(), and MONTH()/MONTHNAME() to extract the pieces, and concat them together how you'd like them.
    --
    Jonathan Petruk
    DB2 Database Consultant

Posting Permissions

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