DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Date format

  1. #1
    Join Date
    May 2002
    Posts
    163
    Hello

    I have a column PRCSS_DT that is a VARCHAR2 data type.

    The sample values are

    20021001
    20021001
    20021001



    Now I want to display those values with format MM-DD-YYYY.

    How to do that?

    Thanks in advance.

    Nwcomer
    Student

  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    I'll assume your '20021001' is representation of YYYYMMDD format (it could also be YYYYDDMM though). For your desired date display format you would use:

    TO_CHAR(TO_DATE('20021001','YYYYMMDD'),'MM-DD-YYYY')
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

Posting Permissions

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


Click Here to Expand Forum to Full Width