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

Thread: How to convert this to proper date format??

  1. #1
    Join Date
    Jun 2000
    Posts
    55

    Angry

    I have a field named expire_dt. It's a char(10). For example:

    EXPIRE_DT
    ----------
    2002-08-31
    2002-08-31


    How to convert that to this:

    Aug/31/01

    Thanks

    Qingbo

  2. #2
    Join Date
    Jan 2001
    Posts
    60

    Format

    Hi

    If u want to display in the req format

    it is To_char(column_name ,'mon/dd/yy')

    Thanks
    lnr
    html code is off

  3. #3
    Join Date
    Jan 2001
    Posts
    515

    Talking date format

    select to_char(sysdate,'Mon/DD/YY') from dual;

  4. #4
    Join Date
    Oct 2000
    Location
    Dallas:TX:USA
    Posts
    407
    If your column is CHAR type then you will have to convert that to DATE form before using to_char function. So your query will be more likely as follows --

    select to_char(to_date(expire_dt, 'yyyy-mm-dd'), 'Mon/dd/yy') from dual;


    - Rajeev


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