How to get date in dd/mm/yyyy format ?

Hello,
for this query :
>select to_date(to_char(sysdate),'dd/mm/yyyy') from dual;
i wanted to get date in dd/mm/yyyy format , but this query is not returning in correct date format .
How to get that ?

select id,
to_date(to_char(dt1,'mm/dd/yyyy'),'dd/mm/yyyy') dt1,
to_date(to_char(dt2,'mm/dd/yyyy'),'dd/mm/yyyy') dt2
from t_table1 where no=23;This is my actual query.
But this query is giving error.
ORA-01843: not a valid monthWhen i issued this query :
select id,dt1,dt2 from t_table1 where no=23 ;
this is the output :
ID DT1 DT2
001 10/7/2011 10/19/2011Edited by: bootstrap on Oct 8, 2011 2:13 PM
Edited by: bootstrap on Oct 8, 2011 2:13 PM

Similar Messages

  • How to Insert date in 'DD/MM/YYYY' format in oracle using stored procedure?

    Hi
    How to Insert date in 'DD/MM/YYYY' format in oracle using stored procedure?
    This is my Input data.
    11/25/2007.
    By using below query, it is inserted into database.
    sql>Insert into tblname values(to_date('11/25/2007','MM/DD/YYYY'));
    But using stored procedure, the same query is not running.
    It shows error like
    ORA-01843: not a valid month ORA-06512: at line 1
    Procedure:
    create or replace procedure Date_Test(datejoin in DATE) is
    begin
    insert into datetest values(to_date(datejoin,'MM/DD/YYYY'));
    end Date_Test;
    I had used 'nls_date_language = american' also.
    Prcodeure is created but not worked in jsp. The same error is thrown.
    Pls provide a solution

    This might help you....
    SQL> Create Table DateTest(col1 Date);
    Table created.
    Elapsed: 00:00:00.00
    SQL> create or replace procedure Date_Test(datejoin in DATE) is
    2 begin
    3 insert into datetest values(to_date(datejoin,'MM/DD/YYYY'));
    4 end ;
    5 /
    Procedure created.
    Elapsed: 00:00:00.00
    SQL> exec Date_Test('11/25/2007');
    BEGIN Date_Test('11/25/2007'); END;
    ERROR at line 1:
    ORA-01843: not a valid month
    ORA-06512: at line 1
    Elapsed: 00:00:00.00
    SQL> exec Date_Test(To_Date('11/25/2007','mm/dd/yyyy'));
    BEGIN Date_Test(To_Date('11/25/2007','mm/dd/yyyy')); END;
    ERROR at line 1:
    ORA-01843: not a valid month
    ORA-06512: at "CTBATCH.DATE_TEST", line 3
    ORA-06512: at line 1
    Elapsed: 00:00:00.00
    SQL> create or replace procedure Date_Test(datejoin in DATE) is
    2 begin
    3 insert into datetest values(datejoin);
    4 end ;
    5 /
    Procedure created.
    Elapsed: 00:00:00.00
    SQL> exec Date_Test(To_Date('11/25/2007','mm/dd/yyyy'));
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> Select * from DateTest;
    COL1
    25-NOV-07
    Elapsed: 00:00:00.00
    SQL> create or replace procedure Date_Test(datejoin in VarChar2) is
    2 begin
    3 insert into datetest values(to_date(datejoin,'mm/dd/yyyy'));
    4 end ;
    5 /
    Procedure created.
    Elapsed: 00:00:00.00
    SQL> exec Date_Test('11/25/2007');
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> select * from DateTest;
    COL1
    25-NOV-07
    25-NOV-07
    Elapsed: 00:00:00.00
    SQL>

  • How to convert date  into dd mon yyyy format

    hi all,
    i have a problem in date format i am using date like below .
    <%java.util.Date date = new java.util.Date();%>
    i am inserting date into a table and its storing like this
    insert into tablename (d_date) values (date)
    and its inserting date like below
    Sun Oct 19 09:05:45 GMT+03:00 2003
    i want to fetch date in dd mon yyyy format.
    with this format i want to make a select query.i struck with the format conversion.
    how to do this.
    any comments please.
    any help

    hi all,
    i understand now where i am wrong.
    the below code is not working why because in my server where i am executing code the regional setting month value is in arabic.
    i executed the same code in a different server where date and time jones are english its working fine.
    All the problem is in regional setting and not the jsp code.
    <%
    String whtEverDateFormatYouWAnt = "dd MMM yy";
    String str = new SimpleDateFormat(whtEverDateFormatYouWAnt).format(new SimpleDateFormat("EEE MMM dd HH:mm:ss vvv yyyy").parse("Sun Oct 19 09:05:45 GMT+03:00 2003"));
    out.print(str);
    %>
    Thanks a lot for the excellent solution.
    Thanks again.

  • How to insert date in mmm/dd/yyyy format

    hi all,
    im getting date from user-interface in the format of mmm/dd/yyy.
    when i tried to insert data in this format,
    insert into temp values('10-july-2000);
    insert into temp values('july-10-2000');
    the first statement is working fine. and the second statement is givine msg,
    SQL> insert into temp values('10-july-1999');
    1 row created.
    SQL> insert into temp values('july-10-1999');
    insert into temp values('july-10-1999')
    ERROR at line 1:
    ORA-01858: a non-numeric character was found where a numeric was expected
    how to get this.
    regards
    pavan

    I have read that ALTER SYSTEM changes will be effective immediately and there is no need to bounce the database.
    right but if parameter is "modifiable" if not then we need to "restart database"
    there three parameter with "alter system .... cmd"
    1. Memory
    2. Spfile ------------effect in next startup
    3. Both ( Memory + spfile) Default
    hope this helps
    Let take example : PROCESSES is not modifiable parameter.
    SQL> show parameter process
    NAME                                 TYPE        VALUE
    processes                            integer     150
    SQL> alter system set processes = 152 scope=both
      2  /
    alter system set processes = 152 scope=both
    ERROR at line 1:
    ORA-02095: specified initialization parameter cannot be modified
    SQL> alter system set processes = 152 scope=memory
      2  /
    alter system set processes = 152 scope=memory
    ERROR at line 1:
    ORA-02095: specified initialization parameter cannot be modified
    SQL> alter system set processes = 152 scope=spfile;
    System altered.
    SQL> show parameter processes
    NAME                                 TYPE        VALUE
    processes                            integer     150
    SQL> startup force
    ORA-01031: insufficient privileges
    SQL> conn sys as sysdba
    Enter password:
    Connected.
    SQL> startup force
    ORACLE instance started.
    Total System Global Area  171966464 bytes
    Fixed Size                   787988 bytes
    Variable Size             145488364 bytes
    Database Buffers           25165824 bytes
    Redo Buffers                 524288 bytes
    Database mounted.
    Database opened.
    SQL>
    SQL> show parameter processes
    NAME                                 TYPE        VALUE
    processes                            integer     152
    SQL>Message was edited by:
    user52

  • How to print date in dd/MM/yyyy format??

    Hi All,
    I want to print a date in a dd/MM/yyyy format. I am doing like this
    Date d = new Date(23-11-2006); but it is printing
    like Wed Dec 31 18:59:58 EST 1969 .
    Please help me .

    I am doing like this
    Date d = new Date(23-11-2006); but it is
    printing No you're not, because that won't compile. Show us exactly what you're doing and we might be able to help.
    You seem to suggest you want to print a date in a certain format, but then the (pseudo-) code you present seems to suggest you want to be able to parse a date from a given format into a Date object.
    Be clear and specific about exactly what you want, what you have tried, and why it didn't work and then people will be better placed to help! :-)

  • How to get date in  mm/dd/yyyy hh:mm EST format

    Hi All,
    I want to display the sysdate in mm/dd/yyyy hh:mm EST format . Please help if anyone knows.

    try:
    SQL> alter session set nls_date_format ='mm/dd/yyyy hh:mi';
    Session altered.
    SQL> select sysdate from dual;
    SYSDATE
    10/15/2009 09:51or just:
    SQL> select to_char(sysdate, 'mm/dd/yyyy hh:mi') from dual;
    TO_CHAR(SYSDATE,
    10/15/2009 09:52Amiel

  • How to get Date Format from Local Object.

    Hi All,
    I am new to Web Channel.
    I need to know Date format From date of locale.
    suppose there is a date "01/25/2010" date in date field I want to get string "mm/dd/yyyy". Actually I have to pass date format to backend when I call RFC. 
    Is there any way to get Date format from "Locale" object. I should get date format for local object
    I get local object from "UserSessionData" object but how to get Date format from it.
    I am not looking for Date value. I am looking for current local date format ("mm/dd/yyyy or dd/mm/yyyy or mon/dd/yyyy) whatever local date format.  I could not find example which show how to get date format from "Locale" object.
    Any help will be appreciated with rewards.
    Regards.
    Web Channel

    Hi,
    You can get it from "User" or "Shop" business object.
    Try to get User or Shop Business Object as shown below.
    BusinessObjectManager bom = (BusinessObjectManager) userSessionData.getBOM(BusinessObjectManager.ISACORE_BOM);
    User user = bom.getUser();
    char decimalNotation = user.getDecimalPointFormat().getGroupingSeparator();
    If you are seeing "1,234.00" then above code will return "."
    I hope this information help you to resolve your issue.
    eCommerce Developer.

  • How Adobe gets DATE and its format?

    Hello,
    I am getting current (todays) date by using below JS in some flds, and by using below FormCalc for some flds into my_form,
    JS:
    var currentTime = new Date()
    Form Calc:
    $.rawValue = num2date(date(), DateFmt(MM/DD/YYYY))
    But, i dont have much idea that how adobe is getting this date? For my company this is the very first form, hence they are asking me how adobe gets date and its format whether,
    1) From local IP/Interner provider address's date, format?
    2) or user PC/laptop's LOCAL settings date, format? if so, for example, if Germany user (Laptop settings) has a DD.MM.YYYY configured, if this user comes to US on a busines trip and if that user opens the form, then how the date looks like for this user? as per user laptop settings DD.MM.YYYY or local internat provider date format MM//DD//YYYY?
    Thank you

    Hi,
    the date() function returns the number of days since 01.01.1900 for the local date of the current system (related to the system clock of the OS).
    If you travel from Germany to the US but don't update your date/time settings, then it returns the same date in the US as in Germany.
    You can check the behavior by changing your local date/time setting or the timezones.

  • How to get data from a USB-UIRT device using Labview?

    How to get data from a USB-UIRT device using Labview?
    I'm trying to get data from a USB-UIRT device, is it posible with Labview?
    I really appreciate your help, 
    thanks

    You may want to contact the developer of the device for the API and DLL.
    http://65.36.202.170/phpBB2/viewforum.php?f=3

  • How to get data type of variable in program..

    Hi ABAP Guru.
    I need to know how to get data type of variable or any structure field.. because I got short dump when use command REPLACE ALL OCCURANCE ... with variable/structure field that has data type I or P, I think it should be used with data type CHAR only, So I need to check the data type first.
    Please give me your advice
    Thank you all.
    Nattapash C.

    data : v_value type i,
             v_char(10) type c.
    v_value = 10.
    move v_value to v_char.
    REPLACE ALL OCCURRENCES of '#' from v_char....
    Best regards,
    Prashant

  • How to get data in WDDINIT method

    hi...
    how to get data passed through url in WDDINIT method, ... the data is comming in the inbound plug, but plug is executed after WDDINIT...
    thank you.

    Hello Kailash,
    By saying that your data comes in through Inbound Plug itself means that that is the point of access for the data. If there is some standard data, that you can provide through WDDOINIT (e.g. initilizations) but in case of navigation, plugs and events are the only way to send data.
    Hope this helps.
    Regards,
    Neha

  • How to convert system Date into DD-MMM-YYYY Format

    hi friends,
    please help me How to convert system Date into DD-MMM-YYYY Format.
    Regards
    Yogesh

    HI..
    data: w_dt(11) type c,
             w_month(2),
             w_mon(3).
    w_month = p_date+4(2). **p_date = given date**
    case w_month.
    when '01'.
    w_mon = 'Jan'.
    when '02'.
    w_mon = 'Feb'.
    when '03'.
    w_mon = 'Mar'.
    when '04'.
    w_mon = 'Apr'.
    when '05'.
    w_mon = 'May'.
    when '06'.
    w_mon = 'Jun'.
    when '07'.
    w_mon = 'Jul'.
    when '08'.
    w_mon = 'Aug'.
    when '09'.
    w_mon = 'Sep'.
    when '10'.
    w_mon = 'Oct'.
    when '11'.
    w_mon = 'Nov'.
    when '12'.
    w_mon = 'Dec'.
    endcase.
    Now...
      concatenate p_date6(2)  '-'  w_mon  '-'   p_date0(4)  into w_dt.
    write w_dt.

  • How to get data from MS CRM into Crystal Reports

    Hello All,
    Can anybody tell me how to get data into   crystal XI reports with MS CRM.
    Thanks in Advance
    Ramesh

    First you should refer to the Rules of Engagement and then add more info.
    Start off by telling us what version of CR are you using and what is MS CRM?
    Thank you
    Don

  • How to get data from three tables (A,B,C) having one to many relation between A and B .and having one to many reation between b and c

    i have  three tables A,B,C.  there is one to many relation between A and B. and one to many relation existed between table b and c . how will get data from these three tables

    check if this helps:
    select * --you can always frame your column set
    from tableA a
    left join tableB b on a.aid=b.aid
    left join tableC c on c.bid=b.bid
    This is just a general query. However, we can help you a lot more, if you can post the DDL + sample data and required output.
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • How to get data into BI system

    Hi Experts,
             I am a newbie to SAP BI. Please guide me how to get the data from tha R/3 tables into BI system tables. When I check the data in SE11 in R/3 (for ex: VBAK, VBAP...... etc), I could see all the records. Now how can I get the same data in BI system tables? When I check in BI system with Tcode SE11, I couldn't find any data for the tables VBAK,VBAP..... etc. Please guide me how to fill these tables in BI from R/3. Points will be rewarded for the solutions.
    Regards,
    Ravi

    Hi Ravi,
        U can follow the link and know how to get data from R/3 to BI.
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/28/4c553c42360a40e10000000a114084/frameset.htm">data sources</a>
       Still I give overview to u. U need to create data source in R/3 side, replicate them in BI and use them in your info source to load the data. Data source are of two type application specific (system generated) and generic (customer defined). Data Extraction can be based on table, view or infoset query.
    hope this helps.
    Regards,
    Purvang
    Assigning Point is to say Thanks in SDN *

Maybe you are looking for

  • Adapter Exchange Phone Number

    I used the web service to exchange my iPhone adapter. I now have a package and the old adapter that I need to send back. I don't know what phone number to call to schedual a pickup. Please help. Thanks!

  • Problem connection user

    Hello colleagues, I have MDM 7.1 but I have problem connection with user, TEST OK Test connection Oracle SQL> connect mdmsupport/initial1 Connected. Test connection Console Connection ok with user MDMSupport TEST ERROR Test Oracle sddadm> clix dblist

  • Font Size Larger in Firefox :(

    Hey I have designed a site and the font size is larger in Firefox than it is in Internet Explorer. Here's the site: Click here for link I have searched everywhere through google to find answers but none worked. Does it have something to do with font

  • Display of unit of measure...

    Hi Gurus, When I generated a report, all the unit keyfigures got the unit of measure displayed along with the value except for two unit keyfigures wherein the unit of measure got displayed just below the description of the keyfigure and not along wit

  • What are all the iOS shortcuts? i.e *#06#

    *#06# s.n shortcut on iphone & all brand devices Lt and ld local time & day shortcut on blackberry devices What are all the shortcuts on iOS??