Date field in DD.MM.YYYY format printing as MM.DD.YYYY

HI all,
There is a DATE field FKDAT in an invoice whose value is in DD.MM.YYYY format (01.07.2010).
In the print program, this value is being passed into a CHAR field. However, when it gets printed it prints in MM.DD.YYYY format (07.01.2010).
I have already checked the user settings under Own Data and it is in the DD.MM.YYYY format.
Please advise.
Thanks and regards,
Anishur
Moderator message: date formatting questions = FAQ, please search before posting.
locked by: Thomas Zloch on Aug 12, 2010 4:08 PM

Hi ,
In the invoice printing program you should use 'WRITE'  syntax  which will write the date as per user's date format.
e.g  write it_tab-fkdat to gv_date.
Declare gv_date as character 10.
Narayan

Similar Messages

  • Name_in(date field) is converted in which format

    using name_in with a date parameter is automatically converted to dd-mon-yyyy character format. How to change this returning format?

    Can you please give us some more information . I mean elaborate your question
    using name_in with a date parameter is automatically converted to dd-mon-yyyy character format. How to change this returning format?
    in my library
    IF par_param_block IS NOT NULL THEN
    GO_BLOCK(par_param_block);
    ls_first_item := par_param_block||'.'||NAME_IN('system.current_item');
    ls_current_item := NAME_IN('system.current_item');
    --Dynamically get parameters from PARAM block (from forms)
    --pass on ITEM NAME / ITEM VALUE in (From the PARAM block into  the sy_print form - as parameters !!!!)
    i := 0;
    LOOP
    IF GET_ITEM_PROPERTY(par_param_block||'.'||ls_current_item, ITEM_TYPE) IN ('LIST', 'TEXT ITEM', 'RADIO GROUP', 'CHECKBOX') THEN
    i := i + 1;
    ADD_PARAMETER(pck_report_pl, 'PL'||i, TEXT_PARAMETER, ls_current_item);
    ADD_PARAMETER(pck_report_pl, 'PV'||i, TEXT_PARAMETER ,
    NAME_IN(par_param_block||'.'||ls_current_item));
    --- for date fields the name_in returns the date in this format dd-mon-yyyy ----
    END IF;
    NEXT_ITEM;
    ls_current_item := NAME_IN('system.current_item');
    EXIT WHEN ls_first_item = par_param_block||'.'||ls_current_item;
    END LOOP;

  • Formating Invoice Date field to display in Japanese format 2012年2月22日

    Hi ,
    I need expert help in Crystal reports for formatting a field which contains date in Japanese format.
    I need to develop a Japan report that has invoice date as 2012年2月22日 which means 22-Feb-2012.
    Thanks,
    Ravi

    Thanks.. you saved my time.
    I have found the solution for this issue
    totext(year({shiphead.ShipDate}),0) & '年' & totext(month({shiphead.ShipDate}),0) & '月' & totext(day({shiphead.ShipDate}),0) & '日'
    However your solution looks good. Short and sweet.
    totext({shiphead.ShipDate}, 'yyyy年MM月dd日')
    Thanks,
    Ravi

  • How to display date field in ALV in format 'YYYY-MM-DD'?

    Hi experts,
    I am not getting displayed the date field in ALV in the format 'YYYY-MM-DD' if it is different than my user setting's format (DD.MM.YYYY).
    Tried with the edit mask
    LVC_S_FCAT-EDIT_MASK = '____-__-__'  but it does not work.
    I could not find the conversion routine for this. Is it possible to write customer conversion routine?
    I have to use DATE field, otherwise if I display this format in CHAR10 field , sorting in ALV does not work for this field.
    PLEASE ANY HELP!
    Kind regards,
    Danijela

    Hi,
    Use FM FORMAT_DATE_4_OUTPUT.
    TYPE-POOLS : slis, KKBLO.
    TYPES: BEGIN OF t_data,
           sel     TYPE char1,
           matnr   TYPE matnr,
           bldat   type char10,
           END OF t_data.
    DATA: it_tab TYPE STANDARD TABLE OF t_data,
          it_fcat TYPE slis_t_fieldcat_alv.
    DATA: wa_tab TYPE t_data,
          wa_fcat TYPE slis_fieldcat_alv,
          wa_layout type SLIS_LAYOUT_ALV.
    data: lv_repid    TYPE syrepid.
    data : lv_date    type NLEI-IBGDT,
           lv_outdate type RN1DATUM-DATEX,
           lv_format  type RN1DATUM-FORMAT value 'YYYY-MM-DD'.
    lv_repid = sy-repid.
    lv_date = sy-datum.
    CALL FUNCTION 'FORMAT_DATE_4_OUTPUT'
      EXPORTING
        datin         = lv_date
        format        =  lv_format
    IMPORTING
       DATEX         = lv_outdate.
       move lv_outdate to wa_tab-bldat.
    wa_tab-matnr = '0000001'.
    APPEND wa_tab TO it_tab.
    lv_date = sy-datum + 1.
    CALL FUNCTION 'FORMAT_DATE_4_OUTPUT'
      EXPORTING
        datin         = lv_date
        format        =  lv_format
    IMPORTING
       DATEX         = lv_outdate.
       move lv_outdate to wa_tab-bldat.
    wa_tab-matnr = '0000002'.
    APPEND wa_tab TO it_tab.
    lv_date = sy-datum + 2.
    CALL FUNCTION 'FORMAT_DATE_4_OUTPUT'
      EXPORTING
        datin         = lv_date
        format        =  lv_format
    IMPORTING
       DATEX         = lv_outdate.
       move lv_outdate to wa_tab-bldat.
    wa_tab-matnr = '0000003'.
    APPEND wa_tab TO it_tab.
    wa_fcat-fieldname = 'SEL'.
    wa_fcat-ref_fieldname = 'XCHPF'.
    wa_fcat-ref_tabname = 'MARA'.
    wa_fcat-edit = 'X'.
    wa_fcat-checkbox = 'X'.
    APPEND  wa_fcat TO  it_fcat.
    CLEAR :  wa_fcat.
    wa_fcat-fieldname = 'MATNR'.
    wa_fcat-ref_fieldname = 'MATNR'.
    wa_fcat-ref_tabname = 'MARA'.
    APPEND  wa_fcat TO  it_fcat.
    CLEAR :  wa_fcat.
    wa_fcat-fieldname = 'BLDAT'.
    wa_fcat-ref_fieldname = 'BLDAT'.
    wa_fcat-ref_tabname = 'BKPF'.
    APPEND  wa_fcat TO  it_fcat.
    call 'REUSE_ALV_GRID_DISPLAY'' after this
    Edited by: Ankur Parab on Oct 1, 2009 2:50 PM
    Edited by: Ankur Parab on Oct 1, 2009 2:51 PM

  • How to change date format in select-option (mm.yyyy).

    Hi,
       Plz, How to change date format in select-option (mm.yyyy).
      in my selection screen date type selection-option is there ,when i am enter date   it's  taken  dd.mm.yyyy format,but i want mm.yyyy format.
    how to set that .
    Regards,
    Kk.

    sorry
    parameters : pmonyr type spmon or
    select-options : sspmon for PGPL-spmon .
    or what table ccontains spmon.
    regards
    shiba dutta

  • HTML DB  Validate date field

    I create a nondatabase date field (date picker (MM/DD/YYYY) and format mat as MM/DD/YYYY. I want to validate this date field to make sure the entry is valid. mm/DD/YYYY.
    I create a validation for the field, but it did not display the error message in the validation, instead it complains that the character is in numeric field with an OK button.
    Why?
    Is there a Is_date function around?

    There are 2 ways to do this
    http://htmldb.oracle.com/pls/otn/f?p=24317:239
    1. Put readonly="true" in the Form Element attributes for the date picker item. This way the user is forced to select from the date picker calendar and so invalid dates cannot be entered.
    2. If user wants to enter the date or select from the calendar, put a validation as Function body returning error text as in http://i1.tinypic.com/rlgi68.jpg
    Hope this helps.

  • 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 convert a date field with format (dd,mm,yyyy) to format (mm,dd,yyyy)

    Hello.
    How to convert a date field with format (dd,mm,yyyy) to format (mm,dd,yyyy)
    I have text field which has a databind to a date field. When I click on it, we can select the date, it is added on the format (dd,mm,yyyy). When I want to insert this date field to a database It doesnu2019t allow me to do it because it will only accept date field on the format (mm,dd,yyyy)
    I tried to store this format on a date variable and I get a message saying that is impossible to convert a string into a date.
    Regards,
    Jose

    Hi Jose,
    usually you format strings in c# like
    string.Format("{0:yyyyMMdd}", insertyourstring);
    in your case
    string.Format("{0:MM/dd/yyyy}", insertyourstring);
    [look here|http://idunno.org/archive/2004/14/01/122.aspx]
    there are more details
    if everything fails split the string with Mid()
    or ask me
    lg David

  • Date to print in  'MMMM DD, YYYY'  format in SAMRTFORM

    Hi E'body,
    Can anybody help me out in printnig date in 'MMMM DD, YYYY'  format for the Smartform.
    Ex:  25/09/2006 should be printed as Sept 25, 2006.

    hi,
    Check out the program.
    REPORT zricha_01 .
    TABLES t247.
    DATA date(20).
    DATA dt(20).
    DATA time(8).
    WRITE sy-datum TO date USING EDIT MASK '__-__ -____'.
    WRITE sy-uzeit TO time USING EDIT MASK '__:__:__'.
    SELECT SINGLE * FROM  t247
           WHERE  spras  = sy-langu
           AND    mnr    = sy-datum+4(2).
    move t247-ktx to date+3(3).
    concatenate date time into dt separated by space.
    write : / dt.
    Also check out the threads
    Date Conversion???
    Re: Date format conversion
    date conversion
    Regards,
    Richa

  • Select -option Date field in MM/YYYY format!

    Hi.. Friends..
       Iam having DATE field as selection screen SELECT_OPTION parameter.
    And I am fetching records from one of my tables with where condition of this select-option.
    Now my reuirement is to modify that DATE select-option with 7 characters i.e. MM/YYYY
    So if user enters 09/2008 as DATE-LOW.. I have to fetch all records of September 2008.
    If user enters 09/2008(lower limit) and 02/2009(Upper limit)...
    I have to fetch records between... September 1st 2008 to 28th february 2009.
    What is the simplest way to impliment this?
    Thanks,
    Naveen.I

    Hi
    Use data element SPMON as in below code.
      TABLES: S001.
      DATA: l_year(4)  TYPE n,
            l_month(3) TYPE n,
            g_sdate TYPE sy-datum,
            g_edate TYPE sy-datum.
      RANGES: gr_pdate FOR sy-datum.
      CONSTANTS: lc_low   TYPE sy-datum VALUE '00010101',
                 lc_high  TYPE sy-datum VALUE '99990101'.
      SELECT-OPTIONS:   s_spmon  FOR  s001-spmon.
      l_year  = s_spmon-low(4).
      l_month = s_spmon-low+4(2).
    * Get the first day of PERIOD-LOW
      CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
        EXPORTING
          i_gjahr        = l_year
          i_periv        = 'K2'
          i_poper        = l_month
        IMPORTING
          e_date         = g_sdate
        EXCEPTIONS
          input_false    = 1
          t009_notfound  = 2
          t009b_notfound = 3
          OTHERS         = 4.
      l_year  = s_spmon-high(4).
      l_month = s_spmon-high+4(2).
    * Get the last day of PERIOD-HIGH
      CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
        EXPORTING
          i_gjahr        = l_year
          i_periv        = 'K2'
          i_poper        = l_month
        IMPORTING
          e_date         = g_edate
        EXCEPTIONS
          input_false    = 1
          t009_notfound  = 2
          t009b_notfound = 3
          OTHERS         = 4.
      IF NOT s_spmon-low IS INITIAL.
        gr_pdate-low = g_sdate.
      ELSE.
        gr_pdate-low = lc_low.
      ENDIF.
      IF NOT s_spmon-high IS INITIAL.
        gr_pdate-high = g_edate.
      ELSE.
        gr_pdate-high = lc_high.
      ENDIF.
      IF NOT s_spmon-low IS INITIAL OR NOT s_spmon-high IS INITIAL.
        gr_pdate-option = 'BT'.
        gr_pdate-sign = 'I'.
        APPEND gr_pdate.
      ENDIF.
    " SELECT RECORDS
    " >>> SELECT field1 field2 FROM TAB1 WHERE erdat IN gr_pdate. <<<

  • Browser date field format in header

    I am using Browser 2.0 for some ad hoc queries on an Oracle
    7.2.3 database.
    My client is running Windows NT 4.0 with Service Pack 4.
    Regional settings are set to English (Australia).
    The page setup in Browser allows you in the header or footer to
    insert the a date field via "&d". Documentation states this is
    system generated.
    However, in the print preview and print out the date is
    formatted as MM/DD/YY. I need to have it formatted as DD-MON-
    YYYY.
    Can anyone suggest to me from which system the format is being
    generated or any
    suggestions on how to change it in.
    Thanks
    null

    can you paste the timestamp being displayed?
    You can use, format-date function or other, but its all based on the data you have for DATE.

  • Determine Date field format dynamically

    Hello friends,
    I'm writing some database access code in java. The biggest problem I face is date fields. Because I don't know the date field format (For example, in SQL Sever we can have dd/mm/yy or mm/dd/yy, etc), I can't format dates for insert/update statements.
    Is there a way to determine the date field format dynamically? Regardless of database, for ex. MS SQL, Oracle?
    Thank you.

    Hey!
    There is a way to do this! The Oracle Database understands SQL92 Syntax. So you can use
    - {d ?yyyy-mm-dd?} for date representation,
    - {t ?hh:mm:ss?} for time representation,
    - {ts ?yyyy-mm-dd hh:mm:ss.f...?} for timestamp rep.
    Here is a small example:
    // Connect to the database
    // You can put a database name after the @ sign in the connection URL.
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:oci8:@", "scott", "tiger");
    // Create a Statement
    Statement stmt = conn.createStatement ();
    // Select the ename column from the emp table where the hiredate is Jan-23-1982
    ResultSet rset = stmt.executeQuery
    ("SELECT ename FROM emp WHERE hiredate = {d ?1982-01-23?}");
    // Iterate through the result and print the employee names
    while (rset.next ())
    System.out.println (rset.getString (1));I hope this is what you wanted to know!

  • How to handle Multiple date formats for the same date field in SQL*Loader

    Dear All,
    I got a requirement where I need to get data from a text file and insert the same into oracle table.
    I am using SQL*Loader to populate the data from the text file into my table.
    The file has one field where I am expecting date date data in multiple formats, like dd/mon/yyyy, yyyy/dd/mon, yyyy/mon/dd, ,mm/dd/yyyy, mon/dd/yyyy.
    While using SQL*Loader, I can see Loading is failing for records where we have formats like yyyy/dd/mon, yyyy/mon/dd, mon/dd/yyyy.
    Is there any way in SQL*Loader where we can mention all these date formats so that this date data should go smoothly into the underlying date column in the table.
    Appreciate your response on this.
    Thanks,
    Madhu K.

    The point being made was, are you sure that you can uniquely identify a date format from the value you receieve? Are you sure that the data stored is only of a particular limited set of formats?
    e.g. if you had a value of '07/08/03' how do you know what format that is?
    It could be...
    7th August 2003 (thus assuming it's DD/MM/RR format)
    or
    8th July 2003 (thus assuming it's MM/DD/RR format)
    or
    3rd August 2007 (thus assuming it's RR/MM/DD format)
    or
    8th March 2007 (thus assuming it's RR/DD/MM format)
    or even more obscurely...
    3rd July 2008 (MM/RR/DD)
    or
    7th March 2008 (DD/RR/MM)
    Do you have any information to tell you what formats are valid that would allow you to be specific and know what date format is meant?
    This is a classic example of why dates should be stored on the database using DATE datatype and not VARCHAR2. It can lead to corruption of data, especially if the date can be entered in any format a user wishes.

  • How To change the Date display format to dd.mm.yyyy format

    Hello friends
    I am expected to display the date fields in my BEx reports in the standard dd/mm/yy format. However, I find that it is getting displayed in mm/dd/yyyy form.
    This is creating a bit of a confusion for the client.
    Hence can someone please let me know, if I can make any change to the way the date is displayed in the reports.
    Looking for a prompt reply
    Thanks in advance
    regards
    Zubin Kurian

    Hi Zubin,
            There are some corrections in that coding.
    year = year+2(2).
    CONCATENATE day month year INTO l_date SEPERATED BY u2018/u2019.
    Regards,
    Yokesh.

  • Error when saving a default format for a date field in 11g

    Getting this error when attempting to save the default for a date field in 11g:
    The current xml is invalid with the following errors: Bad xml instance! <?xml version="1.0"?> <sawsavedformat:metadata xmlns:sawsavedformat="com.siebel.analytics.web/savedformat/v1.1"><sawsavedformat:columnSavedFormats><sawsavedformat:columnSavedFormat xmlns:saw="com.siebel.analytics.web/report/v1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="sawsavedformat:regularColumnSavedFormat" columnName="&quot;Retrospectives&quot;.&quot;Time Dim&quot;.&quot;Two Months Ago&quot;"><saw:displayFormat><saw:formatSpec suppress="suppress" wrapText="true" visibility="visible" hAlign="left" vAlign="top"><saw:dataFormat xsi:type="saw:custom" customFormat="MMMM dd, yyyy" displayTimeZone=""/></saw:formatSpec></saw:displayFormat><saw:tableHeading><saw:displayFormat><saw:formatSpec/></saw:displayFormat></saw:tableHeading><saw:columnHeading><saw:displayFormat><saw:formatSpec/></saw:displayFormat></saw:columnHeading></sawsavedformat:columnSavedFormat></sawsavedformat:columnSavedFormats></sawsavedformat:metadata>
    Line:2, Col:608, Attribute 'displayTimeZone' is not declared for element 'dataFormat'
    Thoughts and suggestions?

    I have a Support Request open with Oracle right now (it's taking a few weeks to resolve) but here's the update:
    OBIEE 10g handles DATE types differently than 11g. Both the support rep and I can't figure out how, but they are different. If you bring the column in as a DATETIME in your Physical Layer you can't save it system-wide, even if you do set a time zone for your account (My Account -> Preferences -> Time Zone). If you bring the column in as DATE you can save it system-wide but you can't display the hours/mins/secs, only the M/D/Y. This has been tested on a 9i and 10g database and produced the same thing on both. The problem never occurred with those same columns using OBIEE 10g.
    Oracle support has not fully admitted this as a bug, but the rep working on this SR said this will probably be fixed in the next release- 11.1.1.4, which is due out late Jan/early Feb of this year. He is trying to reproduce this so he can log it as a bug (which we all are hoping for!) so Oracle can address it.
    For now, I've found that you are stuck with two options: 1) bring the column in as a DATE, display it system-wide as a saved format, but you can't show the time, and 2) don't save that date value with a system-wide formatting and set it manually on every report you need a custom format (don't forget to set your time zone).
    If I hear anything more back from Oracle support I'll update this thread.
    Sorry guys, looks like we're all stranded on this one...

Maybe you are looking for

  • Bash: Use command output as argument for next command in pipe

    I'm trying to do this: tail -f /var/logfile | grep -C 0 text | mail -s "OUTPUT OF GREP" [email protected] How can I do this?

  • Bridge Image Process fails with Lumix GF-2

    We are unable to get image processor in Bridge to allow us to make raw image processing changes to our GF-2 images. Instead of opening in Camera Raw Processor, it just opens the images. How can we change this?

  • Photoshop crashes when trying to start program

    Photoshop crashes when trying to start program Using Powerbook G-4 10.4.11 15 GB available When trying to open Photoshop it crashes when the display window is trying to open and the text: BUILDING MARK TWAIN is showing. Then it crashes never making i

  • Forward Declaration in Class Builder

    Hi All,    In the Class Builder (SE24)when i create a new Class, There is an option of Forward declaration  in the Property Tab. In this, we can add Type Group Interface and Class. What is the Purpose of this forward declaration?   The F1 help does n

  • [Solved] Lossless JPG Cropping?

    I'm looking for a simple tool to crop and flip/rotate jpg or jpeg images losslessly. Most probably some sort of jpegtran frontend. It can be command line, but a simple gui would be nice. Another feature I want would be overwriting the original. jpegt