Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    1

    Unanswered: Change the Date format

    Hello,

    Can anybody help me how to convert a date field from (MMDDYYYY) to MMYYYY format. Is there any date function availble in SQL.

    I am using DB2UDB database.

    Thanks in Advance.

    Chandu

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    left(datecol,2)||right(datecol,4) is the option ..

    If you need it often, wrap this in a UDF

    HTH
    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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