Hi this is  Related to Date format ,

Hi,
This is regarding date , is any body found FM let me know, my requirement is that if you give date for eg  SY-DATUM = 20070424 the out will show in this formant
Display = Apr 24, 2007.
thanks,
ganga

hii..
try this
DATA: L_DAY(2)   TYPE C,
      L_MONTH(2) TYPE C,
      L_YEAR(4)  TYPE C,
      L_LTEXT    TYPE T247-LTX.
DATA: L_DATE TYPE STRING.
CALL FUNCTION 'HR_IN_GET_DATE_COMPONENTS'
  EXPORTING
    IDATE                         = SY-DATUM
  IMPORTING
    DAY                           = L_DAY
    MONTH                         = L_MONTH
    YEAR                          = L_YEAR
    LTEXT                         = L_LTEXT
  EXCEPTIONS
    INPUT_DATE_IS_INITIAL         = 1
    TEXT_FOR_MONTH_NOT_MAINTAINED = 2
    OTHERS                        = 3.
CONCATENATE L_LTEXT ',' INTO L_DATE.
CONCATENATE L_DATE L_DAY L_YEAR INTO L_DATE SEPARATED BY SPACE.
WRITE: L_DATE.
or
DATA: V_INPUT(8) VALUE '20112006'.
DATA: V_CHAR(25).
data: date type sydatum.
DATA: MONTH_NAMES LIKE T247.
SELECT SINGLE * FROM T247
INTO MONTH_NAMES
WHERE SPRAS = SY-LANGU
AND MNR = V_INPUT+2(2).
CONCATENATE MONTH_NAMES-KTX V_INPUT(2) V_INPUT+4(4)
INTO V_CHAR SEPARATED BY SPACE.
write: / V_CHAR.
regards,
veeresh

Similar Messages

  • How can i convert this data(00000000) into date format(yyyy-MM-dd)

    Hi,
    i am using this method to convert date format from string.
    public static string FormatDate(string inputDate, string inputFormat)
                System.DateTime date = DateTime.ParseExact(inputDate, inputFormat, null);
                string datepresent = DateTime.Now.Date.ToString("yyyy-MM-dd");
                return datepresent;
    its working properly,
    but when input data is like 00000000 i am getting error this is not valid.
    how can i convert this into date format any help..!

    Have you tried the above code:
    I can see it is working with both Date and DateTime destination nodes.
    Map:
    Functoid Parameters:
    Functoid Script:
    public static string FormatDate(string inputDate, string inputFormat)
    string datepresent;
    if (inputDate == "00000000")
    datepresent = "0000-00-00";
    else
    System.DateTime date = DateTime.ParseExact(inputDate, inputFormat, null);
    datepresent = date.ToString("yyyy-MM-dd");
    return datepresent;
    Input:
    <ns0:InputDateString xmlns:ns0="http://DateFormat.SourceSchema">
    <DateString>00000000</DateString>
    </ns0:InputDateString>
    Output:
    <ns0:OutputDate xmlns:ns0="http://DateFormat.DestinationSchema">
    <Date>0000-00-00</Date>
    </ns0:OutputDate>
    If this answers your question please mark as answer. If this post is helpful, please vote as helpful.

  • Is there any system variable for this date format 01/21/2004 18:00:32

    Hello,
    Is there any system variable for this date format 01/21/2004 18:00:32
    This is my Internal date format and my External date format is sy-datum.
    How can I validate....any suggestions will be apprecaited!
    Regards,
    Kittu

    Hello,
    Thank you very much for your response!
    My internal date format is 01/21/2004 18:00:32
    and external date format on selection-screen is sy-datum.
    My external format is stored in S_crtsp
    and internal format is stored in L_crtsp. (01/21/2004 18:00:32)
    I want to remove the time from the internal format and validate it aginst the external format.
    Any suggestions or brief explonation is appreciated...I apprecaite the help soo far...
    Regards,
    Kittu

  • Date format in file Formetter.js using Web IDE

    Hi Experts,
    I know that at the forum includes discussions which relate to date format, but I couldn't find topics of the date format using Formatter.js file in Web IDE.
    To the point. It's the fragment of my index.html file, where can find resourceroots:
                                  <script id="sap-ui-bootstrap"
                                                   src="resources/sap-ui-core.js"
                                                   data-sap-ui-libs="sap.m"
                                                   data-sap-ui-theme="sap_bluecrystal"
                                                   data-sap-ui-xx-bindingSyntax="complex"
                                                   data-sap-ui-resourceroots='{"RbsNew": "./"}'>
                                   </script>
    My Formatter.js file looks like:
    jQuery.sap.require("sap.ui.core.format.DateFormat");
    jQuery.sap.declare("RbsNew.Formatter");
    sap.ui.RbsNew.Formatter = {     
    date : function (value) {
             if (value) {
                    var oDateFormat = sap.ui.core.format.DateFormat.getDateTimeInstance({pattern: "yyyy-MM-dd"});
                    return oDateFormat.format(value);                                     
            else {
          return value;
    and it's located directly in the project directory - RbsNew.
    I try use this file to format the date in Detail.view.xml file - exactly in Table. The fragment of code looks like:
    <Text
                text="{
                                   path:'Bdate',
                                   formatter:'sap.ui.RbsNew.Formatter.date'
                    }"/>
    Unfortunately, I can't see the expected results.
    Please help, because I don't know what I'm doing wrong.
    Regards
    Marcin

    try
    <Text 
                text="{ 
                                   parts : [ 'Bdate'], 
                                   formatter:'RbsNew.Formatter.date' 
                    }"/> 
    btw, any errors in console?

  • Repcleanupu and date formats

    Post Author: Thang Nguyen
    CA Forum: Data Quality
    i've got SQL Server installed with a date format of YYYY-DD-MM.
    When I run repcleanupu it tries to execute a query with a date format of YYYY-MM-DD so results in an out of range problem when it does the date conversion.
    Does anyone know how to correct this?
    Thanks

    Post Author: amr_foci
    CA Forum: Data Quality
    im more related with oracle,,
    you can fix this by using th date format mask in ur query,,
    i think you will find the same in SQL Server Database
    try to check with format masks
    good luck
    Amr

  • Date format in flat file recon

    Hi,
    I am trying to do Flat file reconciliation but i am getting some error related to date format. I have tried format like 20 march 2009, 02-02-2010,20 Mar 2009,2010-01-01,2010/01/01
    can any one please suggest me which format i need to use.
    Thanks

    Hi sunny,
    I get the same error during GTC Flat file recon. "java.text.ParseException: Unparseable date: "2009/01/25"
    my xl.defaultDateformat=yyyy/MM/dd hh:mm:ss z and source Date Format is given as yyyy/MM/dd(2009/01/25) and the date format in my flatfile is given as yyyy/MM/dd. But i still get this error.
    I also tried with the following dates in flatfile
    2009/Mar/25
    2009/01/25
    2009/March/25
    Did I miss anything here!
    Thanks

  • Wrong date format in FM: RH_READ_OBJECT

    Hi All,
    I found an error in date format returned in field OBEG of FM: RH_READ_OBJECT.
    It returns: 20112804 and it should be 20110428 (this is Sap internal date format)
    It is strange because it does not happen all the time just in some particular scenarios.
    Do you have any idea about this issue? Is there any note related to this?
    Below a link to a debug screenshot:
    [http://tinypic.com/view.php?pic=1zegppt&s=7]
    Thanks!

    Hi,
    Try debugging the FM and check at which point the wrong date is passed on to OBEG export parameter.
    There is a piece of code available in FM -
    obeg  = temp_buffer-begda.
    May be some problem can occur fetching from buffer.
    Harish

  • Error in date format returned in FM: RH_READ_OBJECT

    Hi All,
    I found an error in date format returned in field OBEG of FM: RH_READ_OBJECT.
    It returns: 20112804 and it should be 20110428 (this is Sap internal date format)
    It is strange because it does not happen all the time just in some particular scenarios.
    Do you have any idea about this issue? Is there any note related to this?
    Below a link to a debug screenshot:
    [http://tinypic.com/view.php?pic=1zegppt&s=7]
    Thanks!

    Hi Viji and thanks for your answer!
    I checked checked user default settings and we have the same date format as anther user who is working ok.
    Also I do not think it is a user settings related error because this is the result returned by a standard FM in debug mode so the value in the screenshot should be in internal Sap format which is: YYYYMMDD.
    Any other idea on this?
    Thanks!

  • Date Format in Record Selection

    Hello,
    I have a problem where the Crystal Report is not returning all the rows that meet the record selection criteria because I believe there is a problem with the date format.
    My record selection criteria is:
    ( {EMPOS.POS_STARTC} <= {@EB_EDATE} and {EMPOS.POS_ENDD} >= {@EB_SDATE} ) or
        IsNull({EMPOS.POS_ENDD} )
    where EB_EDATE and EB_SDATE are formula fields with the values Date(2011, 12, 31) and Date(2011, 01, 01) respectively which returns the format of DD/MM/YYYY used by the FinanceOne (F1) ERP application that we run the report from.  Both formula fields are overriden by the run parameters in the same date format in F1.
    If I were to run the SQL below in a query tool like Toad, it returns a row where pos_startc is 1/01/2011 and pos_endd is null, that is not included in the report.
    select * from empos where det_numbera = '01285'
                          and ( (pos_startc <= '20111231' and pos_endd >= '20110101') or pos_endd is null )
    1. Why is Crystal Reports excluding this row when the date format is different?
    2. How can I change the criteria (or format) to include the one of many other rows missing?

    Hello,
    Crystal Reports is now returning all rows where pos_endd is null in the database with the record selection criteria of:
    {CHRIS_EmpSal.pos_endd} = date(0, 0, 0)
    However, when I run it in Finance One, it doesn't like this date format   Is there another way to get both Crystal and Finance One (i.e., SQL Server DB) to recognise the same syntax for null dates?

  • Export to excel issue - date format cannot be displayed properly

    Dear all,
    When we do a export to excel, if it has date format, we always have problem on displaying it in excel. Some of the date if we change the data format, it will be changed to the correct way. Others will remain the old data format. Any idea?
    I've checked the SAP note. It doesn't work. Thank you in advance.
    Regards,
    Yuka
    SAP Note:
    Click the Excel symbol in the task bar in Business One
    Save the file as ".txt"
    Open Excel and open the file as a ".txt" (Select in "Files of type" All Files (,))
    In the Text Import Wizard Select "Delimited" and for "Start import at row" 1.
    Click "Next"
    In the Text Import Wizard - Step 2, select 'tab' in "Delimiters", for "Text qualifier:" choose ""
    Click "Next"
    In the Text Import Wizard - Step 3, highlight the Date column and in "Column data format" check the radio button Date in the drop down menu beside Date you can set the date format you require
    Click "Finish"

    Dear Yuka,
    You may check this thread:
    Re: Incorrect date format in excel reports
    Thanks,
    Gordon

  • URGENT !!!!   Problem with Date format MM/DD/YYYY in oracle database to BW

    Hi
    I am wondering if somebody can help me urgently.
    I have oracle database where date is of the format MM/DD/YYYY and I am loading data into BW. DATE data type
    Date in oracle database: 3/30/2007
    First when I used InfoObject ZDATE (with 0DATE) reference (DATS data type) data load failed saying that
    'Value '30-MAR-0 ' of characteristic 0DATE is not a number with 000008 spaces'
    Then I created ZDATE InfoObject as CHAR Type (Length 10) with PDATE Conversion Routine.
    when I created datasource using DB Connect and checked the contents using 'Display Table Contents' after creating data source the data field distorted as
    AR/-0/30-M
    After data load. when I checked PSA
    The Date records look same as AR/-0/30-M
    In cube the field appeared as  30-MAR-0  (last digit of year disappearing)
    In BEx report also it looks like 'AR/-0/30-M'
    Can somebody help me as quickly as possible.
    What should I do if i want to still use DATS data type for ZDATE?
    should I change date format in database if so to what?
    If I should use CHAR type with PDATE or any other routine can somebody give me the routine to have the date in the report exactly as it appears in database?
    I also tried changing date format in user profile...settings. But still its the same.
    Thanks in advance.

    Hello Snrella,
    You can solve this by converting the date format from oracle to the SAP internal date format  using an ABAP routine in the transfer rules.
    Assuming the oracle data field name is ZODATE then here's the ABAP you can use in the transfer rules. Create an ABAP routine transfer rule from ZODATE to your ZDATE infoobject, and then put this ABAP code there. (this code assumes that the format of the date from oracle is MM/DD/YYYY).
    concatenate tran_structure-/BIC/ZODATE+6(4) tran_structure-/BIC/ZODATE(2) tran_structure-/BIC/ZODATE+3(2) into result.
    Hope this helps.

  • PJC Calendar setDate Wrong date format. Date change failed?

    Forms 10.1.2 using forms demos pjc code.
    The calendar pjc I added to my form works except I can't initialize it with a date. If I try to initialize a date it always produces 'Wrong date format. Date change failed.' error.
    In a post-query trigger, I initialize the calendar's date using:
    SET_CUSTOM_PROPERTY('PJC.CALENDAR',1,'setDate',to_char(:lead.date_received,'DD.MM.YYYY'));
    In the java console, this yields:
    Warning: Wrong date format. Date change failed.
    Warning: Wrong date format. Date change failed.
    I get the same result when using a hardcoded date like:
    SET_CUSTOM_PROPERTY('PJC.CALENDAR',1,'setDate','01.12.2006');
    What is the flaw in my incantation?

    Hello,
    This is the syntax used in the calendarpjc Forms demo:
        call the setDate method on the calendar PJC via the PL/SQL built in
        set_custom_item_property
        convert Oracle date to String recognised by Java
      procedure setDate(d in date) is
      begin
        set_custom_property(lGlobals.hCalendar,1,'setDate',to_char(d,'Mon DD, YYYY'));
      end;     Francois

  • Date format in table TCURR

    In table TCURR the Value from field holds the date in the following format 79909771. What does this mean in normal date format?

    99999999 - 79909771 = 20090228 = 28/02/2009

  • Date Format in VC

    Hi,
    We have a details table where there is particular date field which is automatically displayed as plain text. The user can edit these records by selecting the line item. The date value should be given in the Date Picker for the user to change the values if needed.
    The format in which the date field displayed as text in the table is YYYYMMDD (20101021). I need to display this field in the date format as DD.MM.YYYY. I tried using the formula something like this
    DATE(MID(@Expected_Resolution_Date,1,4),MID(@Expected_Resolution_Date,5,2),MID(@Expected_Resolution_Date,7,2)) - This will give the year, month and date fields separately.
    Only DSTR has the option of providing the format in the date function so I tried something like DSTR(DATE(MID(@Expected_Resolution_Date,1,4),MID(@Expected_Resolution_Date,5,2),MID(@Expected_Resolution_Date,7,2)) ,"DD.MM.YYYY")
    It throws me a error Expected date value/expression. Can someone help me out here? I need to convert in this date format and show it in the date picker.
    Thanks,
    Nagarajan.

    I fixed the problem by playing around with the formula editor.
    Thanks.

  • Date format in Master inspection characteristics

    Hi All
    I have a requirement where my user wants to enter the date format in the master inspection characteristic. For example we want to add date of manufacture and the date of expiree as a inspection characteristics and during the results recording they want to enter this characteristics in a date format.
    MY question is can we have a master inspection characteristic with a date format, if so what all the settings are required.
    Please suggest.
    Thanks,
    Quantum.

    >
    quantum wrote:
    >Can i use characteristics in the inspection plan instead of the master inspection characteristics. I am using Work bench transaction code CWBQM to create an inspection plan.
    Direct characteristic you can't use in inspection plan. If you want to use characteristic in IP then create chara. (CT04), then assign this charac. as class chanr.(QS21) in MIC. Now you can use this MIC in inspection plan.
    Hope this helps.
    Thanks!!!

Maybe you are looking for

  • Customer service complaint - very disappointed

    I just spent another hour on the phone with Verizon's Customer Service.  After being a loyal customer since 2003, my phone stopped working.  I went into a store and they helped me get it replaced.  The second phone I got had issues with it's battery

  • How do I find and use the Firefox Identity Finder feature?

    On a web page that compares various Web browsers, the following narrative describes a Firefox 5.0 feature called Identity Finder: "Once Identity Finder has secured all exposed private data, a laptop thief or spying Trojan won't be able to steal your

  • MIGO (Goods Receipt) Executed...No Idoc

    One of our sites must manually run MIGO, Goods Receipt transaction. All of our other sites use scanners for barcoding that does the MIGO during thre scan. The issue is when our one site runs MIGO manually, unless they exit MIGO and re-enter MIGO, the

  • Java 6 uninstall and then install for MAC OS 10.5.8, how do I do it?

    I am using RefWorks and Write-N-Cite at school and am having trouble with them.  Refworks cust service said there is a corrupt java file in my computer and that I need to uninstall Java 6 from macbook OS 10.5.8 and reinstall.  How do I do this?  Does

  • Adding months to date

    I need to add 6 months to current date. Also, may be days or years also. Can anyone let me know is there any function module which can be used to achieve the functionality.