Date Format Help: DD-MON-YY

Hello everyone.
Good Day.
I would like to seek your help regarding my inquiry on the PL/SQL script output that I am trying to create.
Please see below output of my script:
L7,CU4450278,70X1W01AGA-ASY,11813,20-6æ -13,0
L7,CU4464442,747X32VH9015-ASY,3394,20-6æ -13,0
L7,CU4464766,747X22VH9015-ASY,3383,21-6æ -13,0
As you can see in the CSV output, the date has some invalid value, the "6æ " should have been Jun (i.e. Short Month format of June).
My script has this code for date dbms_output to_char(startplan_rec.str_startdate,'DD-MON-YY')
The startplan_rec.str_startdate data type is date.
I have tried querying the same table in the oracle sql developer, but i am getting the correct output (e.g. 20-Jun-13).
Please help me on having my desired date format output on my pl/sql. Why is my date output on my script incorrect?
Thanks in advance.
Regards,
Jeff.

JEFTPHPH wrote:
Hi Hoek:
I am using sql plus for the project.
I was just following a certain format from a requirements that is why I am still using the YY thing.
BTW, I've heard about the Y2K thing when i was on college.
THanks,
Jeff.
Boy does that make me feel old.  A few years ago I was at a workshop when a young developer expressed to me his opinion that Y2K was a hoax.  His "proof" was the fact that "nothing happened after all."  I had to explain to him that reason it seemed "nothing happened" is because armies of guys like me had spent two years busting our butts fixing the problem before the excrement collided with the ventilation system.
But I have code that is older than his birth certificate.

Similar Messages

  • How can I change defaut date format to dd-mon-yyyy in bi analytics

    hi..
    How can I change the default date format to DD-MON-YYYY in BI Analytics...
    I am passing a date in a report from a prompt....but it is always taking "dd-mon-yyyy hh:mm:ss" format...I want to input the prompt in oracle's default date format i.e dd-mon-yyyy..
    please help...I dont want to use cast function because it will convert the date into a character value....I want a date...

    Hi USer
    Try this link
    How to change date format in OBIEE
    Re: repository variable at date prompt
    Thanks
    Diney

  • Convert date format from 'dd/mon/yy' to 'mon/yy'

    I know there's probably a load of questions already on this but I can't locate a simple straightforward explanation with examples on how to change the date 'DD/MON/YY' format to a month/year format 'MON/YY'.
    Can anyone assist with a useful response, Thanks

    woof777 wrote:
    Thanks both of you for the prompt responses.
    I used the to_char(sysdate,'mmyy') from dual response, but also found the other useful.
    Just another quick question, this field was in date format, why did I need to change it to CHAR?DATE datatype have NO format & are stored as BINARY values.
    The only datatype that can be presented to screen, CRT, or data file are ASCII CHARACTERS!
    Your Mileage May Vary below
    19:28:46 SQL> select sysdate from dual;
    SYSDATE
    2012-08-19 19:28:53
    19:28:53 SQL>

  • Date Format help req

    Hi all,
    Can u pls let me know how to subtract 1 millisecond from this '01-OCT-09 12.00.00.000000000 AM' date format.
    Thanks in Advance

    p78 wrote:
    Hi all,
    Can u pls let me know how to subtract 1 millisecond from this '01-OCT-09 12.00.00.000000000 AM' date format.
    Thanks in Advance1 millisecond is (1/((24*60*60)/1000))

  • ADF: Setting date format to DD-Mon-RRRR

    Hi Everyone,
    I am using Jdev 11G.
    I have created one VO with the query : select *from employees.
    VO has 24 columns. One of the column is hiredate column which is currently displayed as : 6/25/2008 but
    my requirement is to change the format to 25-Jun-2012.
    How can i achieve this???
    Any answers will be really grateful.
    Thanks..

    Go to the view object.. choose the attribute .. under UI hints... Foramt type and choose Simple date.. and you can set your own format.
    Hope this helps.
    Rakesh

  • Date Format help needed

    Hello Friends,
    I need to mormat my date valye to get something like the following:
    Sunday December 3rd, 2006 OR
    Tuesday December 5th, 2006
    I understand that one can give a custom format for date as per the SimpleDateFormat symbols. However, I did not find anything for achieveing the pattern in bold
    Can you please help?
    Regards,
    Leena

    umm.. did not think about it..
    I thought on it after reading your post.
    My first thoughts for writing my own formatter are that I will have to extend the SimpleDateFormat class, right?
    Not sure what do I do next.. :(
    Regards,
    Leena

  • Data format - Help needed!!!!!

    I have a String with this value:"Thu Dec 19 09:23:49 2002" ;
    is there a java method to convert it automatically in another string to this format: "19/12/2002" or "12/19/2002" (it depends on italian date)
    thanks all!!

    As dateString does not seem to be a proper Java term (unless Mr sssako knows something I do not) I would be a string.
    You could do it with two instances of SimpleDateFormat, one set up for the format of the string you have and one set up for the format you want.
    You then call parse() on the first one to get a date and use that date as the parameter to a call to format on the second one.
    String s = "Thu Dec 19 09:23:49 2002";
    SimpleDateFormat input = new SimpleDateFormat("E MMMM d HH:mm:ss yyyy");
    SimpleDateFormat output = new SimpleDateFormat("dd/MM/yyyy");
    try
        s = output.format( input.parse(s) );
        System.out.println(s);
    catch ( ParseException e )
        e.printStackTrace();
    }

  • Date format help

    Hi,
    select to_char(SYSDATE,'MMDDYYYYHHMISS') from dual;
    Ouput:
    10082012010338
    It is giving me correct output, but i want to display even the Fraction of seconds, how can i?
    I have tried this..but not working..
    select to_char(SYSDATE,'MMDDYYYYHHMISSFF') from dual;
    Output: Error.
    Please help me in this.
    Thanks.
    Edited by: 910575 on Oct 8, 2012 1:05 AM

    910575 wrote:
    Hi,
    select to_char(SYSDATE,'MMDDYYYYHHMISS') from dual;
    Ouput:
    10082012010338
    It is giving me correct output, but i want to display even the Fraction of seconds, how can i?
    I have tried this..but not working..
    select to_char(SYSDATE,'MMDDYYYYHHMISSFF') from dual;
    SYSDATE doesn't have fractions of seconds.
    Output: Error.
    Please help me in this.
    Thanks.
    Edited by: 910575 on Oct 8, 2012 1:05 AM

  • Need help in converting date format

    Hi,
    Need help in converting date format from 'DD-MON-YYYY' to 'YYYY-MM-DD' in an .rtf template as I believe xml publisher supports the date format as 'YYYY-MM-DD' only.
    Thanks,
    Raj.

    I got the same problem, anyone know how to solve this problem? I allready found some date functions on http://blogs.oracle.com/xmlpublisher/2008/09/date_functions.html . I also tried <?xdoxslt:month_name(xdoxslt:get_month(xdofx:substr(NEED_BY_DATE, 4,3)), $_XDOLOCALE), 0, 'nl-NL')?>, but then it returns a namespace error (Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'xdofx' used but not declared.). Anyone know how to fix this?
    Edited by: user11165753 on 7-dec-2009 23:50

  • Regarding TO_DATE function and Default Date Format DD-MON-YY

    I am using oracle 10.2 version. As far as my knowledge default date format is 'DD-MON-YY'. I want to know that why first query is not giving result.
    SQL> select sysdate from dual
    2 where sysdate = to_date('06-JUL-11','DD-MON-YY');
    no rows selected
    SQL> select sysdate from dual
    2 where to_date(to_char(sysdate),'DD-MON-YY') = to_date('06-JUL-11','DD-MON-YY');
    SYSDATE
    06-JUL-11
    Thanks,
    Rohit

    A date in Oracle always contains hours, minutes and seconds. These values can optionally all evaluate to zeroes, at midnight.
    TO_DATE('06-JUL-11','DD-MON-YY') means midnight of the sixth of july 2011.
    So
    sysdate = to_date('06-JUL-11','DD-MON-YY') only at midnight of the sixth of july 2011...
    While during the day, after midnight,
    trunc(sysdate) = to_date('06-JUL-11','DD-MON-YY')and
    sysdate > to_date('06-JUL-11','DD-MON-YY')Max

  • Date format in xml file

    Hi,
    I am relatively new to XML and JSP.I am on a project where i have to transfer data to and from an Oracle 8i database to XML using JSP.everything worked fine except for the follwing:
    the date format in xml is always 'yyyy-mm-dd HH:MM:SS'.
    the datatype is date in oracle and string in jsp.when i try to upload the data in XML to oracle it gives me date format not recognised error.I ve tried using trunc and to_char in the query which fetches records into a recordset in JSP but to no avail.i keep getting the same format.
    Can someone please help with with having the date format as 'dd-mon-yyyy'.
    Thanks a heap for the help
    regards,
    Vinayak

    Hi,
    I ve tried out the solutions suggested by you and tried using java.sql.Timestamp
    as follow:
    <%@ page import="java.sql.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="oracle.sql.*" %>
    String dateString = rset.getString("installation_dt");
    java.sql.Timestamp date = new java.sql.Timestamp.valueOf(dateString);
    But tomcat throws up the following error
    :104:
    cannot resolve symbol
    symbol : class valueOf
    location: class java.sql.Timestamp
    java.sql.Timestamp date = new java.sql.Timestamp.valueOf(dateString);
    Hope you can help me.
    Thanks a heap
    Regards,
    Vinayak

  • Date format issue in Web Analysis...

    Hi,
    I am creating a report by connecting to a couple of relational tables. I'm using SQL Spreadsheet and SQL Subscription objects. I'm creating a Date filter using SQL Subscription object (list box) using the data source created by the SQL Spreadsheet. My database default date format is 'DD-MON-YYYY'. But in the list box it shows as 'YYYY-MM-DD HH24:MI:SI". When this value is selected, I get a "Literal mismatch error" since it doesn't match with the value stored in the database.
    Why the format in WA is showing in this format even though it is fetchting it from my database in which the format is 'DD-MON-YYYY'. Is this related to WA date format settings? I cannot find anywhere in WA studio where I can set date formats. Is this something to be set in the server or webanalysis.properties file?
    PS: I tried to work around this by storing the date value as character in the database but then I am not able to sort them ascending or descending order.I also tried creating the web analysis relational database connection which creates a virtual cube. But even there when I build the report using Data Source Navigator, it is showing date in 'YYYY-MM-DD HH24:MI:SI'.
    H

    Hi,
    Let me provide you the details of the report.
    A concurrent program has been created with executable as XDODTEXE (XML publisher report).
    In the data definition, we have embed one query which fetches transaction date and due date from some tables based on some conditions.
    Now, we have to show these date columns in report output which will be in EXCEL format.
    We want these date outputs to be printed in dd/mm/yyyy format. That is the reason we had given-
    TO_CHAR(TO_DATE (SUBSTR(transaction_date,1,10), 'DD/MON/RRRR'),'DD/MM/RRRR') in the SQL query.
    Problem in output is- In date columns, data after 12th is fine i.e. in format dd/mm/yyyy, it is printing properly.
    But before 12th, it is printing in format mm/dd/yyyy as mentioned below-
    01/10/2012--wrong format, it should be 10/01/2012
    01/11/2012--wrong format, it should be 11/01/2012
    01/12/2012--wrong format, it should be 12/01/2012
    13/01/2012--correct format (dd/mm/yyyy)
    14/01/2012--correct format (dd/mm/yyyy)
    How can i send you the attachment, is there any way/any email id?
    Rgds-
    Sumir

  • Date format in Oracle 10g XE

    I'm using Oracle 10g XE on Windows Vista and I'm curious as to what determines the date format.
    According to the globalization section in the Oracle installation guide the NLS_DATE format is dependent on the NLS_LANGUAGE setting. In my database the NLS_LANGUAGE is American, the NLS_TERITORY is America and all other NLS_* parameters are blank (default).
    From that I would expect the default date format to be mon-dd-yyyy.
    However when I run SELECT sysdate FROM dual the date is reported as dd/mm/yyyy and this was the default format when I used SQL Developer and when I used the command line SQL*Plus. Obviously something else is determining the date format, but what?

    Your settings are dependent on NLS_LANG on the client.
    They are derived from (assuming Windows) the regional settings of the O/S.
    This means in Western Europe the default 'American_America.WE8MSWIN1252'.
    This makes the default NLS_DATE_FORMAT dd-mm-yy.
    You can override this in the registry, or set up an after logon trigger.
    Sybrand Bakker
    Senior Oracle DBA

  • Convert Oracle date format masks to Java format masks

    Have an application based on Oracle that stores data in text form (for display) and in native date format. It is being migrated to another application with a Java based front end that can only use Java format masks to display the dates in the desired display format.
    Is there a way to translate the Oracle format masks to Java? I can do this in SQL or PL/SQL using the database or in Java.
    I really don't want to write detailed code to parse the masks, although if parsers are available to take an oracle mask into its metadata (minute, year, etc), it may be possible for me to write the code.
    This seems like something that must have been done many times over the years. I would prefer to reuse workable code rather than reinventing the wheel.
    To be clear, I do not need to alter data or convert dates shown in string form. Just the format masks so the new app will display dates in the same manner as the old app. Fortunately, both apps handle interpreting the format masks in their native technology, so it is just converting the format mask.

    kenmadsen wrote:
    Both applications have a varchar2 column and a date column. A date picker selects and returns the date in native format for storage and the application uses the mask to format the varchar2 column for display (and storage). The old application uses an Oracle date format mask DD-Mon-YYYY HH24:MI and the new application uses Java date masks (DD-MM-YYYY hh:mm). (I may not have the translation from HH24 to hh correct).
    The date column and the display column store the same information (a date), but one is stored natively and the other is displayed as the application administrator want the particular row to be formatted for display. (the mask is a column in the same table as the other 2 columns). Each row has characteristics (other columns) that determines what the data is and how it should be shown (some things need to show time; others only the date)
    So the problem is, when migrating, the new application cannot render the dates as the old app did because "Mon" is Oracle format, not Java format.
    No data is being converted in the migration, except for the mask itself. Both applications have the same record structure with respect to these columns and they both use the mask to generate the formatted varchar2 data for display in the application and storage.too bad you insist on try to describe with words rather than actual CODE.
    Please explain again why this is an Oracle problem & NOT a Java problem?
    Oracle RDBMS is a data repository & can't automagically change data content for you.

  • Date format Problem in forms&reports Services 10g

    Hi Dears,
    I Faced a problem during running reports ( i am using forms& Reports Services 10g), when i pass the parameters via parameter form to the report (built in forms10g Rel 2.0) its appearing in arabic like (25-يناير-2010) as my Date Formate is (DD-YYYY-MON) and NLS_LANG parameter is defined as Arabic_Saudi arabia.AR8MSWIN1256 so as a result report is not running due to unknown Date formate, how can i change the Same Date format (DD-YYYY-MON) to appear in english like (25-2010-JAN)
    Thanks

    You could specify the parameter as type VARCHAR2, explicitly cast it (maybe to DD.MM.YYYY) when you pass it from forms and cast it back in your query, like TO_DATE(:P_PARAM, 'DD.MM.YYYY')

Maybe you are looking for

  • Why doesn't my built in display re-initialize after resuming from sleep mode?

    Hi, I have a MacBook Pro (2.53 GHz Intel Core 2 Duo, 4 GB RAM) which I purchased a few years ago.  I always have a secondary display monitor plugged in. When I bought this system, it came with Snow Leopard and I recently upgraded to Lion.  That's whe

  • ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException

    hello all, Actually , i had raised this quetion in past but had not satisfied with the answers. explaining in brief this time so , can get actual cause of this. I have two reports subscriptions on same time .. subscriptions executed fine on some day

  • Yikes G4 400mhz cpu in a Beige G3 AIO L2 cache problems

    Ok here is a wered one i bought a Yikes G4 mobo and G4 400mhz cpu for $40. It shows up today i take out my orignal G3 266mhz cpu and i install the G4 and set all the jumpers to where is is at 400mhz 66mhz bus. i held the cuda button for 20-30 seconds

  • Complexity of searhing in binary files

    Hello! I have question regarding complexity when searching in a binary file. I have a app that needs to perform a search for a certain string in a large binary file (> 1Gb). For the moment, I read one line of the file into a byte array, convert it to

  • How to setup daily incremental loads

    Hi: OBIEE 11.1.1.6 OBIA 7.9.6.3 I've been building and configuring OBIA in a test environment, and I'm planning the go-live process. When I move everything to production, I'm sure I would need to do a full load. My question is, what do I need to do t