Results 1 to 2 of 2

Thread: Date Formats in Oracle

  1. #1

    Thread Starter
    Lively Member Flustor's Avatar
    Join Date
    Sep 2001
    Location
    A small hole in Birmingham
    Posts
    76

    Date Formats in Oracle

    Hi

    Anyone know how do convert numerical months to text months in Oracle?

    I'm looking for the Oracle equivelent of:

    VB Code:
    1. Function ReturnTextMonth(ByVal iMonthNumber As Integer) As String
    2.  
    3. ReturnTextMonth = Format("01/" & iMonthNumber & "/2003", "mmm")
    4.  
    5. End Function
    My Spidey senses are tingling!

  2. #2
    Addicted Member
    Join Date
    Jan 2001
    Location
    MPLS
    Posts
    187
    Similar to your vb code, you could convert it to a valid date, then convert it back to a charater string for your three digit month abbreviation. Try

    <code>
    select to_char(to_date('01/' || '02' || '/2003', 'DD/MM/YYYY'), 'MON') from dual
    </code>

    Should give you "FEB" as a result.

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