What is the use of To_date, to_char functions?

what is the use of To_date, to_char functions?
while i am using these in my day to day activities but never able to know the exact working of tehse.
Message was edited by:
437022

Dates are stored and manipulated as coded (binary) values that always contain "century, year, month, date, hour, minute second"
We don't want to see the date as stored. We want to see the characters (digits) that make up the date. So we use to_char(the-date-value)
We want to tell the system a date, but have a heck of a time entering the binary. So we input the characters (digits) that make up the date and tell the system to convert that to a binary 'date' using to_date(our-string-that-respresents-dates)
The magic Oracle has added is the format codes (see chapter 2 of the SQL Reference manual for the complete list). We can get the system to print out dates and times, including day of week (and so on) using format codes.
The default format is to show us the date but not the time. Which leads a lot of people to believe that the time is not stored.

Similar Messages

  • What is the use of Source Partner function

    Dear Experts,
    Can you please explain me the exact use of Source Partner Function in Partner Functions in procedures in Customizing.
    Is it used to propose only sold to party partner function or any partner function from the master data of particular partner function.
    I read SAP standard help but I got confused because of its example. It is as below.
    Source partner function
    Partner function which serves as an alternative source for determining the sold-to party.
    Procedure
    If you don't want the system to propose a partner from the sold-to party master record, enter another partner function here. The system will then propose the sold-to party from the master record of your partner function.
    Example
    If you enter WE (ship-to party) in this field for the function VE (sales employee), when you create the sales document,  it determines the sold-to party from the VE partner function in the ship-to party's master document.
    kindly reply. thanks in advance
    sagar wagh

    Dear Sagar,
    While determining the partner functions you can define that particular partner should be determined from the source partner functions master data.
    For example you want to determine the Freight forwarder and you want to make sure that  this partner function should be proposed as per the ship to party then in customizing for freight forwarder partner function you will maintain the source as ship to party. Due to this customization when you will be creating the sales order for sold to party x and assume that for x you are having two different ship to party at two distinct locations. For these  two locations you have different freight forwarder  providing the services(one for each location). So to determine the right freight forwarder the above mentioned customizing will be required. Otherwise system will propose this partner function as per sold to and that will be same for all ship to.
    Hope this example will help you to understand the usage of source in partner determination.
    Thanks and regards,
    Atul

  • Why do we use open URL in default browser function? What are the uses of it?

    Why do we use "open URL in default browser" function?  What are the uses of it?

    kdm7 wrote:
    Okay.
    So can we keep a web button to access the www.ni.com ? So that web site opens only when button pressed?
    P.S  I,m a newbie.
    Yes, you can also, e.g. include a help file or manual as html and open that in the browser.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • What is the use of ABC indicator in functional location segment.

    Hi Expert,
    I want to know about ABC indicator in functional location segement actually, what is the use of indicators in master data?
    Regards,
    Ram Rathode

    Hi,
    As per Application help, ABC indicator signifies:
    An indicator that is assigned by the procedure of ABC analysis.
    The following ABC indicators are possible:
    A - Important
    B - Less important
    C - Relatively unimportant
    According to these criteria, "A" materials are those materials that are of greatest importance for the production operations of a company.
    Examples of use for ABC indicators are vendor master records, material master records, and master records of technical objects.
    You can customize the values in ABC indicator as per your requirement
    Thanks

  • What is the use and functionality of a message type

    Hi,
    I am new to abap. Can anybody tell me what is the use of the message type? What is it used for?
    There is an interface which is using an extended idoc type ZFIDCCP02 (Basic Type FIDCCP02). This extended idoc type is used for other interfaces and the interface in question. However the other interfaces are using the standard message type FIDCC2, but the interface in question is using a customized message type.
    Any idea what could be the reason?
    Thanks in advance.
    Mick

    Hi Mick,
    Message type tells the about the actual meaning of Idoc..
    later if you want to send data to external system the idoc type or extension type is not used..
    the message type is used for rest of the process..
    Idoc type is know as structure..
    << Cut and paste without attribution from http://www.*******************/2009_01_01_archive.html removed >>
    << Cut and paste without attribution from http://searchsap.techtarget.com/sDefinition/0,,sid21_gci852485,00.html removed >>
    << Points unassigned >>. 
    Regards,
    Prabhudas
    Edited by: Prabhu Das on May 14, 2009 8:38 PM
    Edited by: Rob Burbank on May 25, 2009 4:30 PM

  • What is the use of additon in up to 1 rows in SELECT statement

    Hi All,
             What is the use of up to 1 rows in select statement.
    for example
    SELECT kostl
          FROM pa0001
          INTO y_lv_kostl UP TO 1 ROWS
          WHERE pernr EQ pernr
          AND endda GE sy-datum.
        ENDSELECT.
    I'm unable to get in wat situations we hav to add up to 1 rows
    please help me out...
    Thanks,
    santosh.

    Hi,
    Use "select up to 1 rows" only if you are sure that all the records returned will have the same value for the field(s) you are interested in. If not, you will be reading only the first record which matches the criteria, but may be the second or the third record has the value you are looking for.
    The System test result showed that the variant Single * takes less time than Up to 1 rows as there is an additional level for COUNT STOP KEY for SELECT ENDSELECT UP TO 1 ROWS.
    The 'SELECT .... UP TO 1 ROWS' statement is subtly different. The database selects all of the relevant records that are defined by the WHERE clause, applies any aggregate, ordering or grouping functions to them and then returns the first record of the result set.
    Regards,
    Bhaskar

  • What is the difference betwee decode & case function

    Hi
    What is the difference betwee decode & case function
    1.decode can't used in pl/sql 1) case can be user
    2.in decode we can't use (>,<,>=) 2) we can use
    any other do u have....
    thanks in advance....

    DECODE works with expressions which are scalar values.
    CASE can work with predicates and subqueries in searchable form.
    There is one more Important difference between CASE and DECODE
    DECODE can be used Only inside SQL statement....
    But CASE can be used any where even as a parameter of a function/procedure
    Eg:-
    SQL> create or replace procedure pro_01(n number) is
      2  begin
      3  dbms_output.put_line(' The number  = '||n);
      4  End;
      5  /
    Procedure created.
    SQL> set serverout on
    SQL> var a varchar2(5);
    SQL> Begin
      2  :a := 'ONE';
      3  End;
      4  /
    PL/SQL procedure successfully completed.
    SQL> Begin
      2   pro_01(Decode(:a,'ONE',1,0));
      3  End;
      4  /
    pro_01(Decode(:a,'ONE',1,0));
    ERROR at line 2:
    ORA-06550: line 2, column 9:
    PLS-00204: function or pseudo-column 'DECODE' may be used inside a SQL
    statement only
    ORA-06550: line 2, column 2:
    PL/SQL: Statement ignored
    SQL> Begin
      2    pro_01(case :a when 'ONE' then 1 else 0 end);
      3  End;
      4  /
    The number  = 1
    PL/SQL procedure successfully completed.Message was edited by:
    Avi
    Message was edited by:
    Avi

  • What is the use of transaction code FAGLGA15

    What is the use of transaction code FAGLGA15.What is its functionality.Please help.

    Hello,
    Yes, you are right. Before ECC 6.0 version the TC: KSU5 has been used for actual assessment. Now in ECC 6.0 the same transaction code has been changed to FAGLGA15. You can execute the actual assessment in test run and if it is ok then run in background.
    Thanks
    Para

  • What is the use of transaction code VF24

    what is the use of transaction code VF24. if possible please provide some documentation

    Hi,
    The main use of VF24 transaction code : edit work list for invoice list.
    This enables the user to understand the processes left during the combine processing of invoices.
    like which are left for releasing to accounts, which have still pending payment posting, with respect to the invoice list consisting of the combination of invoices.
    invoice list is a combination of different invoices with same critierias. so to check and process these invoice lists collectively this function is used.
    regards,
    siddharth.
    regards,
    Siddharth.

  • What is the use of t-code MD74 - Reorganising independant requirements

    what is the use of t-code MD74 - Reorganising independant requirements

    basically it to delete the unwanted PIR for the last period.
    Let us say you planned PIR for 100.
    At the end of Period the total salae order were 90, PIR shows 10 excess, this has to be deleted. We can do it manually, but this can be done collectively
    pl go through the link below
    http://help.sap.com/saphelp_47x200/helpdata/en/cb/7f9b7043b711d189410000e829fbbd/frameset.htm
    With the reorganization function, you can delete planned independent requirements for which there are no sales orders in the database. You can delete the planned independent requirements history.
    A key date is required to carry out reorganization which is calculated as follows: the system checks whether a reorganizing interval is maintained in Customizing for the plant that you want to reorganize. If an interval is maintained for this plant, the system uses this information to calculate the key date. If no interval is maintained for this plant, the system checks whether intervals are maintained for any other plants, and selects the largest interval to calculate the key date. You can change the key date proposed in the initial screen for reorganization.
    You can change the proposed key date when deleting the history. You can set a shorter interval for deleting histories than for deleting the requirements records.

  • What is the use of REUSE_ALV_FIELDCATALOG_MERGE

    Hi
    in alv's what is the use of REUSE_ALV_FIELDCATALOG_MERGE OTHER THAN ADDING FIELD HEADINGS
    Title Edited by: Alvaro Tejada Galindo on Jan 11, 2008 4:20 PM

    Hi,
    This is the functionality of that FM,
    Supports the creation of the field catalog for the ALV function modules
    based either on a structure or table defined in the ABAP Data
    Dictionary, or a program-internal table.
    The program-internal table must either be in a TOP Include or its
    Include must be specified explicitly in the interface.
    The variant based on a program-internal table should only be used for
    rapid prototyping since the following restrictions apply:
    o   Performance is affected since the code of the table definition must
        always be read and interpreted at runtime.
    o   Dictionary references are only considered if the keywords LIKE or
        INCLUDE STRUCTURE (not TYPE) are used.
    If the field catalog contains more than 90 fields, the first 90 fields
    are output in the list by default whereas the remaining fields are only
    available in the field selection.
    If the field catalog is passed with values, they are merged with the
    'automatically' found information.
    reward points if useful,
    seshu.

  • What is the difference between subroutine and function module?

    What is the difference between subroutine and function module?

    Hi,
    they can both return values.
    FMs are mainly used when a routine is to be performed by many programs.
    Subroutines (forms) are generally only executed within one program.
    You can perform routines from other programs, but it's not often done.
    both forms and FMs are reusable modularization units.
    To distinguish we generally say that forms are used for internal modularization and
    FMs are used for external modularization.
    To decide on which to implement, consider whether you need the content to be used just for a limited program
    or wheteher it can be called from many independent programs.
    For the first purpose it is better to implement a form whereas for the second we implement an FM.
    However, ABAP does not isolate the usage context.
    That is; you can call a form from another program within whose code the form is not actually implemented.
    However, this requires attention since the form may utilize global variables.
    The same issue holds for FMs.
    FMs are encapsulated in function groups and function groups may have global variables that can be globally
    used by all FMs inside it.
    Thanks,
    Reward If Helpful.

  • What is the Use of Imported Archives in Mapping Objects

    Hi All,
    What is the Use of Imported Archives in Mapping Objects ( IR )
    Regards
    Vamsi

    Hi Vamsi,
    When we are doing JAVA , XSLT mappings we have to do import archievs
    after developing the JAva mapping in NWDS and create jar file come back to IR under imported archieves we will import the jar file.
    Similarly XSLT als make the zip and import under imported archieves
    Also when we have any java packages ,import it under archieves and make them to use in UDF
    See the below links
    XSLT Mapping
    /people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
    /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    XSLT Mapping with java enhancement
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2flibrary%2fxi%2fxi-design_configuration%2ffileValidationsinSAPXI-ACaseStudy.pdf
    Check this thread...
    Reusability of User-defined Functions
    Check this thread...
    Re: User-defined function in multiple Message Mappings
    Using external JARs in Web Dynpro Dev.Component
    see sap documentation:
    http://help.sap.com/saphelp_nw04s/helpdata/en/4c/b2ad3de2d76b3be10000000a114084/frameset.htm
    Cheers...
    Vasu
    <b>** REward POints if found useful **</b>

  • What is the use of 'keep' parameter in BDC

    Hi
    In BDC while transfering data, what is the use of 'keep' parameter in BDC.

    Hi Jyothsna,
    In the function module <b>BDC_OPEN_GROUP</b>, the <i>EXPORTING</i> parameter<i><b> KEEP</b></i> acts as a <b>deletion indicator for session</b> in which the batch data executed.
    <i><b>CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
      CLIENT                    = SY-MANDT
      DEST                      = FILLER8
      GROUP                     = FILLER12
      HOLDDATE                  = FILLER8
       KEEP                      = FILLER1
    ---</b></i>
    <i><b>KEEP</b></i> retains the session after successful processing if its value is set to <i><b>'X'</b></i>.  A session that is kept remains in the input/output queue until an administrator deletes it in <i><b>SM35</b></i> transaction.
    Sessions that contain errors in transactions are kept even if KEEP is not set.
    Default: If not set, then sessions that are successfully processed are deleted. Only the batch input log is kept in SM35 transaction.
    Hope this sort out your query.
    PS If the answer solves your query, plz close the thread by rewarding points to each reply.
    Regards

  • What is the use of SYSAUX Tablespace in Oracle 10G

    Dear Experts,
    Please Tell me What is the use of SYSAUX Tablespace in Oracle 10G Because
    during Web Load Testing It is going to increase countinuosly.Although i am not using this with any tables.
    How Can I find out the what is gong on in this.
    Can I Remove this tablesspace and other non using Schemas like FLOWS_020100,MDSYS,OUTLN,DIP and TSMSYS etc.

    What is SYSAUX?
    The SYSAUX tablespace provides storage of non-sys-related tables and indexes that traditionally were placed in the SYSTEM tablespace. For example, the tables and indexes that were previously owned by the system user can now be specified for a SYSAUX tablespace. Unfortunately, Oracle still places the SCOTT schema and the other demonstration schemas in the SYSTEM tablespace. Go figure.
    The SYSAUX tablespace is specified with the CREATE DATABASE command. This is demonstrated in the example database creation script in Figure 1.1.
    CREATE DATABASE test
    MAXINSTANCES 1
    MAXLOGHISTORY 1
    MAXLOGFILES 5
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    DATAFILE '/usr/oracle/OraHome1/oradata/aultdb1/test/system01.dbf' SIZE 300M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
    EXTENT MANAGEMENT LOCAL
    SYSAUX DATAFILE '/usr/oracle/OraHome1/oradata/aultdb1/test/sysaux01.dbf' SIZE 120M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
    DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/usr/oracle/OraHome1/oradata/aultdb1/test/temp01.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL
    UNDO TABLESPACE "UNDOTBS1" DATAFILE '/usr/oracle/OraHome1/oradata/aultdb1/test/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
    CHARACTER SET WE8ISO8859P1
    NATIONAL CHARACTER SET AL16UTF16
    LOGFILE GROUP 1 ('/usr/oracle/OraHome1/oradata/aultdb1/test/redo01.log') SIZE 10240K,
    GROUP 2 ('/usr/oracle/OraHome1/oradata/aultdb1/test/redo02.log') SIZE 10240K,
    GROUP 3 ('/usr/oracle/OraHome1/oradata/aultdb1/test/redo03.log') SIZE 10240K
    USER SYS IDENTIFIED BY "password" USER SYSTEM IDENTIFIED BY "password";
    Oracle10g sysaux
    With the new SYSAUX tablespace, Oracle comes closer to providing all the needed tablespaces for a truly OFA-compliant database right out of the box. With just one CREATE DATABASE command we can specify the SYSTEM tablespace, the TEMPORARY tablespace, the AUXSYS tablespace, the default UNDO tablespace, and the redo logs.
    Of course, with the Oracle Managed Files option you can create an entire database with a single command, but the database created is not suitable for production use and is not OFA-compliant.
    The SYSAUX tablespace is required in all new 10g databases. Only the SYSAUX tablespace datafile location is specified. Oracle specifies the remainder of the tablespace properties including:
    online
    permanent
    read write
    extent managment local
    segment space management auto
    If a datafile is specified for the SYSTEM tablespace, then one must be specified for the SYSAUX tablespace as well. If one is not specified, then the CREATE DATABASE command will fail. The only exception is for an Oracle Managed File system.
    During any update of a database to Oracle Database 10g, a SYSAUX tablespace must be created or the upgrade will fail. The SYSAUX tablespace has the same security profile as the SYSTEM tablespace. However, loss of the SYSAUX tablespace will not result in a database crash, only the functional loss of the schemas it contains.
    Can I drop SysAux?
    DROP DATAFILE
    Read this...

Maybe you are looking for