Date format in different databases like DB2, MS SQL, Oracle etc.

Hi,
Is there any standard date format, which works on any database like DB2, MS SQL Server, or Oracle 8i.
Right now I am using specific format for each database.
I am using the following syntax to retrieve the records on Jun 14, 2001.
MS SQL Server:
select * from tablename where
CONVERT(character(10),ReceiptDateTime, 120) >='2001-06-14'
and CONVERT(character(10), ReceiptDateTime , 120) <'2001-06-15'
Oracle:
select * from tablename where
TO_CHAR(ReceiptDateTime,'YYYY-MM-DD') >= '2001-06-14'
AND TO_CHAR(ReceiptDateTime,'YYYY-MM-DD') < '2001-06-15'
Is there any way we can generalize the date formt?
Any help appreciated.
Thanks,
Naidu

Hi,
Perhaps any difference when you compare the outcomes of
SQL> select * from nls_database_parameters;
SQL> select * from nls_session_parameters;on both databases?

Similar Messages

  • Different date format in different database..

    Hi,
    We have two database (10g) with same NLS settings.When we are reading the data from a table and assigning the value to XML tags using oracle.xml.sql.query.OracleXMLQuery class , with one database connection, the data format is coming as MM/DD/YYYY like <PYMT_DATE>7/23/2008 0:0:0</PYMT_DATE>
    but with other database it is coming as YYYY-MM-DD like <PYMT_DATE>2009-08-10</PYMT_DATE>..
    Can somebody help me out ?

    hi..
    Check the data format used to retrieve the date in the query ..
    TO_DATE (......................)
    Check whether both the db's are having same conversions..

  • APEX Application accessing data from two different databases

    Hi All,
    Currently as we all know that APEX Application resides in database and is connected to the schema of that database.
    I want APEX Application to be running and accessing data from two different databases. Elaborating my question,
    Currently, my APEX Production Application is connected with XXXX Schema of DB1 Database(Where APEX Resides). Now I want to add some pages into this APEX Application for REPORT Purpose, But I want to connect this REPORT APEX Pages to get data from Different Schema YYYY for Database DB2.
    Is it possible to configure this scenario?
    The reason for doing this is to avoid the REPORT related (adhoc queries) resource utilization effect on Production DB1 Database.
    Thanks
    Nil

    1. If you do the joining of two or more tables in DB1 then all data is pulled over to DB1 and then the join is executed: so more data over the databaselink and more work for DB1. Better keep the joining stuff where the data resides and just pull exactly that data over that you need.
    2. Don't know about your different block sizes. Seems a nice question for one of the other forums (DBA or SQL).
    3. I mean create synonyms on DB1 for reports VIEWS in DB2.
    Hope all is clear!

  • How can i Migrate a database from DB2 to SQL Server 2008r2.

    Hi Gurus,
    Kindly help me letting me know the process for migrating the database from DB2 to SQL Server.
    1) Is there any way to migrate a database from DB2 to SqlServer. (My assumption is we can not migrate database, if wrong correct me gurus).
    2) Or we can only transfer data from that DB2 database to SQL Server (Using SSIS packages).
    Please help me knowing the process to migrate the data from DB2 server to MSSQL server. Even am reading the documents available in the web.
    Thanks in advance.. :)

    Microsoft provide a migration assistant for DB2 to SQL Server:
    http://www.microsoft.com/en-us/download/details.aspx?id=45296
    SQL Server Migration Assistant (SSMA) is a free supported tool from Microsoft that simplifies database migration process from DB2 to SQL Server and Azure SQL DB. SSMA automates all aspects of migration including migration assessment analysis, schema and
    SQL statement conversion and data migration. 
    Hope that helps

  • Connect to different Databases like Oracle, SqlServer,Access,Db2

    Hi all,
    i'm in the process of developing an application using jsp , which should be capable of connecting to all datbases like Oracle, SQL Server,Access DB2, Sybase etc,
    How can i establish that?
    Also what all are things i need to take care,which are specific to each of these databases,like datatype differences etc?
    Any information or links with sample codes is helpfull.
    regards.
    Isaac

    Theoretically if you use just the JDBC API then you should be able to access all these databases. This will be true if you're not using 'exotic' datatypes or functionality. If you are, then you may be in for problems - for example I've had problems with clobs and Oracle that required Oracle specific code, which goes against what you're doing. If that happens, just have call outs to helper classes that use the vendor specific stuff, and only load these classes if you detect that particular JDBC driver, and abstract these vendor specific classes to a standard interface.

  • Data format changing from database to datagridview

    hi I am trying to display data from database sqlite  to datagridview the data format changed automatically
    the date in database is
    2012-02-20 16:42:10.00 but on datagrid view it appears like  20/02/2012 16:42:10,
    swOut.Write(",");
    swOut.Write(dataGridView1.Columns[i].HeaderText);
    swOut.WriteLine();
    //write DataGridView rows to csv
    for (int j = 0; j <= dataGridView1.Rows.Count - 1; j++)
    if (j > 0)
    swOut.WriteLine();
    dr = dataGridView1.Rows[j];
    for (int i = 0; i <= dataGridView1.Columns.Count - 1; i++)
    if (i > 0)
    swOut.Write(",");
    value = dr.Cells[i].Value.ToString();
    //replace comma's with spaces
    value = value.Replace(',', ' ');
    //replace embedded newlines with spaces
    value = value.Replace(Environment.NewLine, " ");
    swOut.Write(value);

    This forum is for Microsoft products, they have already and endless quantity of databases, many even freeware. 
    Try therefore for your question the forums for SQLite.
    SQLite has very special own way of datatypes.
    Success
    Cor

  • Compare Table Data on 2 different databases having same schema

    I need to compare data in all the tables in 2 different databases having same schema.
    If there is any difference in data in any table on Database1 and Database2 then I need to update/insert/delete the rows in my table in Database2.
    So Database1 is my source database and Database2 is my sync database. I cannot use expdp tables as I am not having sufficient privileges to the database server.
    Also I cannot drop and recreate the tables as they are huge.
    Can anyone please guide me how to compare data and to write a script to comapre the changes in say Database1.Table1 and Database2.Table1 and then accordingly do inserts/updates/deleted on Database2.Table1?
    Thanks

    Karthick_Arp wrote:
    Do you have a DBLink? If youes you can do this.
    1. Login into the Database-2 and run this code.
    begin
    for i in (select table_name from user_tables)
    loop
    execute immediate 'truncate table ' || i.table_name;
    end loop;
    end;This will empty all the tables in your Database-2. Now what you need is to just populate the data from Database-1This might result in error, if any of the tables have referential integrity on them.
    From 10g documentation :
    Restrictions on Truncating Tables
    You cannot individually truncate a table that is part of a cluster. You must either truncate the cluster, delete all rows from the table, or drop and re-create the table.
    You cannot truncate the parent table of an enabled referential integrity constraint. You must disable the constraint before truncating the table. An exception is that you can truncate the table if the integrity constraint is self-referential.
    If a domain index is defined on table, then neither the index nor any index partitions can be marked IN_PROGRESS.I would go for normal MERGE. Also change the cursor to select table names by first modifying the child tables and then the parent table.

  • Date Format is different in WebI Rich Client and Infoview

    Hi All,
    Iam facing problem with date format , but i need the date format as like dd-mm-yyyy.
    WEBI Rich Client is displaying the format  dd-mm-yyyy.
    but in infoview it is displaying like mm/dd/yyyy
    Can i have any solution for this ..
    Thanks
    Mahesh

    Hi
    Did you sort this out?
    I am new to BO reporting, and now encountering this issue as I start publishing WEBI reports via INFOVIEW on the portal.
    Cheers,
    Andrew

  • CalendarUI element showing different date format for different locations

    Hi,
    I have an input field with date calendar in my webdynpro Java form . User can select date from this calendar and fill the input field. For this I have used input field  in my layout and have binded this with one context attribute of type date. Say name of this field is requiredByDate
    Now when I build and deploy my code, I can see the the required By date field and user is able to select date values from the calendar button next to the input field. The format of the date selected is mm/dd/yyyy.
    However , when a user tests this application from other location say Malaysia, for him the format is coming as dd/mm/yyyy after selecting the date from the calendar.
    Just want to know ,is there is difference in date format for differnt locations ? For India, when you select the date its showing mm/dd/yyyy and for Malayisa its showing dd/mm/yyyy.
    Is there anything we can do by changing our system settings like timezone or dateformat in system settings.
    I am using standard UI element and binding it with context element of type date.
    Need your advice or help on this..
    Thanks and regards,
    Sai

    Hi,
    go to
    [http://help.sap.com/saphelp_nw04/helpdata/en/f4/d95664da179b4db731e21c2e470b72/frameset.htm|http://help.sap.com/saphelp_nw04/helpdata/en/f4/d95664da179b4db731e21c2e470b72/frameset.htm]
    It describes the fallback sequence followed by the Web Dynpro for Java Runtime in order to determine the current session locale.
    Regards
    Matteo

  • Date format is different

    Hi,
    I have a excel report showing milestone dates. All of a sudden the date columns show different date formats ( alternatively dd/mm/yyyy  and mm/dd/yyyy ). What is this weird behaviour ?  what are the corrective measures ?
    thanks in advance
    D Bret

    yes, the PC settings are done with a short date as dd/mm/yyyy  and the cube dates are correct. Only issue is date are appearing differently - alternate
    Char 1       dd//mm/yyyy      mm/dd/yyyy.....dd/mm/yyyy..
    any idea ?
    thnks
    D bret

  • Answers - date format on different machines

    Hi all.
    On a machine where OBISE is installed in answers for one date i clicked "save as the system-wide default for this data type. Since then, all dates when i access OBI from that machine are in that format.
    When I access it from another machine I have to "save as the system-wide default for this data type" again.
    I want to know:
    1) Where is the configuration saved for every machine?
    2) How to configure that every machine that uses OBI have the sam default date format? (example: if I have 1000 users that they all don't have to make their default format.)
    Thank you.

    I'm not sure you understood me well. I have OBI just on one machine and catalog is, naturally, also on that machine. When I open application from browser on other machine I get different format, and for every machine is diiferent. It is strange behavior, if you ask me. I want to configure OBi, so that, nevermind which machine I'm phisically on, I have same dates.
    So, the real question is how OBI knows from which machine I'm coming and where it is saved. It isn't in metada.
    Another question, not related with this is, where is the 1000's separator option saved, because it also isn't in metadata, where decimal separator and places is.

  • Active Data Guard in different database versions (11.2.0.3  and 11.2.0.4)

    In case of Active Data Guard can i run different database versions (11.2.0.3  and 11.2.0.4) at Primary and DR for production environment ?  And will having RAC in environment make any difference?

    Hi,
    >>In case of Active Data Guard can i run different database versions (11.2.0.3  and 11.2.0.4) at Primary and DR for production environment ?
    As per normal Data Guard requirement, Oracle 11.2 does support flexibility where Primary and Standby may have different hard wares such as CPU architecture and OS etc. but the Oracle RDBMS software version must be the same. Having said so does not mean it will not support it. Beginning with 11.1.07, a physical standby database can be used to execute a rolling database upgrade to a new Oracle Patch Set or database release by using the transient logical rolling database upgrade process. It means you can have with different database version but for how long, you need to check above documents.. For complete information you should read this note:
    Data Guard Support for Heterogeneous Primary and Physical Standbys in Same Data Guard Configuration (Doc ID 413484.1)  &
    http://www.oracle.com/technetwork/database/features/availability/maa-wp-11g-transientlogicalrollingu-1-131927.pdf
    2) >> And will having RAC in environment make any difference?
    NO.   You can find answer at -  https://docs.oracle.com/cd/E11882_01/server.112/e41134/standby.htm#SBYDB4716
    **The primary database can be a single instance database or an Oracle Real Application Clusters (Oracle RAC) database. The standby databases can be single instance databases or Oracle RAC databases.
    HTH,
    Pradeep

  • Date format in different from System Preferences

    The date display in the top right corner of the menu bar is not according to the custom setting I have defined in System Preferences.
    In Language & Region, I defined the date format to be <day of month number> < name of month> <year>.
    The menu bar however displays the date in American style date format of <name of month> <day of months number>.
    Is there any way to have Numbers pick up the date format from Language & Region as defined in System Preferences?

    The date display in the top right corner of the menu bar is not according to the custom setting I have defined in System Preferences.
    In Language & Region, I defined the date format to be <day of month number> < name of month> <year>.
    The menu bar however displays the date in American style date format of <name of month> <day of months number>.
    Is there any way to have Numbers pick up the date format from Language & Region as defined in System Preferences?

  • Joining Querry to check data in two different database tables

    Hi,
    I have table employee in sqlserver and oracle database.I have to perform joining based on emp id.I know how to perform join if tables are present in one
    database.But for different database tables any one can explain

    DBLINK AND Understanding Oracle Heterogeneous Services
    1) http://docs.oracle.com/cd/B28359_01/gateways.111/b31042/newoverview.htm
    2) http://docs.oracle.com/cd/B28359_01/gateways.111/b31042/configodbc.htm
    Ramin Hashimzade

  • Can you minimize logging in a SSIS data flow when the database is in a SQL Server 2012 Always On Group?

    We have a file that we are loading 1st into a staging database then into a production database that contains over 5 million rows. Both databases belong to a SQL Server 2012 AG. We would like to minimize the logging in the staging database but t
    the same time keep the staging database in the AG. I know about fast load and setting the buffer settings in SSIS but I've read that this doesn't work on replicated tables and I am assuming that speaks to the AG.
    Are there any articles or someone's personal experiences with this type of scenario that could point us in the right direction and offset some of the initial data load into staging by minimizing logging?
    Thanks,
    Sue
    Sue

    Hi Sue,
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
    Thank you for your understanding and support.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for