Issue in Date format in process

Hi,
I am using format-dateTime-withFormat() function in process to convert the format to mm-dd-yyyy. While formatting the date its subtracting date and month by 1.
Example: current-date() gave the output as "2012-01-17". When I am formatting this using
format-dateTime-withFormat
Please let me know is there some bug in this function or am I missing out something in the parameter.
Thanks and Regards,
Ambika(current-date(),'mm-dd-yyyy'). I am getting output as "00-16-2012".

I got the solution to this problem.
mm - stands for minutes
MM - stands for month.
When I changes the pattern to "MM-dd-yyyy". I got the correct month.

Similar Messages

  • Issue with Date Format

    Hi All,
    I m facing an issue with Date format in the prompt. I have used date presentation variables in my column formula as shown below:
    FILTER("SKU Order Details"."Fulfilled Quantity" USING Time."Calendar Date" <= DATE '@{todate}{2900-01-01}')
    The report returns data when I don't select any date range for start & end date prompts on the page. But when I select the start & end date values in the prompt, I m getting the following error:
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46047] Datetime value 10/22/2009 12:00:00 AM from 10/22/2009 12:00:00 AM does not match the specified format. (HY000)
    I included the following formulas for start & end date prompts:
    Start Date prompt: case when 1=2 then License."Ips Creation Date" else cast ('1.1.1900' as date) end
    End Date prompt: case when 1=2 then License."Ips Creation Date" else cast ('1.1.2900' as date) end
    Can you please help me resolve the issue.
    Thanks,
    Kartik

    Hi Nico,
    I tried putting the format that you mentioned, I m getting an error message.
    My prompts have the following formula :
    Start: case when 1=2 then License."Creation Date" else cast('1.1.1900' as DATE) end
    End: case when 1=2 then Time."Calendar Date" else cast('1.1.2900' as DATE) end
    My column formula has the following syntax:
    FILTER("SKU Order Details"."Fulfilled Quantity" USING Time."Calendar Date" between DATE '@{start}{1900-01-01}' AND DATE '@{end}{2999-01-01}')
    Error Message:
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46047] Datetime value 11/17/2009 from 11/17/2009 does not match the specified format. (HY000)
    Can you please let me know if something needs to be changed.
    Thanks,
    Kartik

  • Issue with Date format - ABAP to XML

    Dear Users,
    We are currently facing an issue with the date formats in XML.
    We have a system (.Net), which has a webservice that we are calling for information from SAP. We created a Proxy class in SAP from the WSDL file and have attempted to use the method that gets us required information based on the Timestamp passed from SAP. However, the timestamp that the INPUT structure uses has a data element XSDDATETIME_Z.
    All we can send from SAP is a simple TIMESTAMP, but the .Net system doesn't accept it since it wants the timestamp in XML format i.e. <dd-mm-yyyy>T<hh:mm:ss>Z. SAP documentation says that the field should automatically do conversion from ABAP to XML format, but that doesn't happen. We don't want to build a string from Timestamp in the XML format and send it out since we might surely miss out on the different cases involved.
    Can anyone please suggest a way for us to send the date out in the required XML format?
    Many thanks!

    Hi Vijay,
    Look at the below sample code and it works fine, i guess there is something wrong in your code or conversion, post the actual code if you are still not able figure it out with the below example.
    DATA: l_xml_string TYPE string,
          l_dat_time TYPE xsddatetime_z.
    CALL FUNCTION 'CACS_DATE_GET_TIMESTAMP'
    EXPORTING
       I_DATE                         = sy-datum
       I_TIME                         = sy-uzeit
    IMPORTING
       E_TIMESTAMP                    = l_dat_time
    EXCEPTIONS
       DATE_NOT_FILLED_BUT_TIME       = 1
       DATE_HAS_NO_VALID_FORMAT       = 2
       OTHERS                         = 3.
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL TRANSFORMATION id
      SOURCE root = l_dat_time
      RESULT XML l_xml_string.
    IF sy-subrc EQ 0.
    write: l_xml_string.
    ENDIF.
    Regards,
    Chen

  • Issue in Date Format in Production

    Hi ,
    I have written for Invoice Prining SAP SCript for F.62.
    In developemt and Quality system Date format is coming" MM/DD/YYYY" But in Production system it is showing "YYYY/DD/MM'.
    I have checked the Program aslo, which is also same in every server and checked the User Profile also, which is showing 'MM'DD'YYYY'.
    I am trying to get the solution, what may be the reason for the same.
    Rgds
    Mohit

    HI Mohit,
    if possible provide your sap script printing code. so that we will analyse the issue.
    For time beeing try  to use below code during Invoice Prining
    DATA: year(4),
          mnth(2),
          day(2),
          l_v_date  TYPE sy-datum.
    CLEAR: date,
           year,mnth,day.
    CLEAR: year,
           mnth,
           day,
           l_v_date.
        year = g_wa_head1-lfdat+0(4).
        mnth = g_wa_head1-lfdat+4(2).
        day  = g_wa_head1-lfdat+6(2).
    CONCATENATE mnth '/' day '/' year INTO date.
    regards
    sudheer

  • Issue with Date Format for Presentation Variables

    Hi,
    I am using dashboard prompts to capture begin date and end date in presentation variables. The dates selected from calendar are in the format mm/dd/yyyy.
    In Asnwers I need to get a count of days between begin and end dates. I am using the column formula as shown:
    TIMESTAMPDIFF(SQL_TSI_DAY, DATE '@{pBeginDate}', DATE '@{pEndDate}')
    When ever I run the report from dashboard I get the following error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46046] Datetime value 1/1/2005 does not match the specified format. (HY000)
    SQL Issued: {call NQSGetQueryColumnInfo('SELECT "Transaction Dates"."Transaction Date", TIMESTAMPDIFF(SQL_TSI_DAY, DATE ''1/1/2005'', DATE ''1/2/2006'' FROM "Dates"')}
    SQL Issued: SELECT "Transaction Dates"."Transaction Date", TIMESTAMPDIFF(SQL_TSI_DAY, DATE '1/1/2005', DATE '1/2/2006') FROM "Dates"
    Can anyone help me to reolve this date format issue?
    Thanks,
    Aravind

    Hi,
    see this below links
    Issues with Prompts calender date
    Regards
    Naresh

  • Obiee 11g upgrade issue for date format

    Hi,
    I am facing a date format issue with obiee 11g report. This statement cast(cast(current_date as char) as timestamp) is failing with "not a valid month" error in obiee 11g. This worked fine with obiee 10g.
    I am basically trying to set the date to 12:00:00 am of the sysdate. Below is what I am trying to achieve:
    timestampadd(sql_tsi_hour, 1, cast(cast(current_date as char) as timestamp)))
    the above statement fails in obiee 11g.
    Thanks for your help,
    AP

    I dont think you need any functions to get the required output, try to set the date format as below
    [FMT:timeStampShort]
    If helps mark
    Thanks
    Edited by: Srini VEERAVALLI on Apr 23, 2013 4:18 PM
    I think with format and then the below should work with no issues.
    timestampadd(sql_tsi_hour, 1,current_date)
    I think you are wasting time by posting here, just do it. You no need any ones permissions to do it ;)
    Edited by: Srini VEERAVALLI on Apr 24, 2013 8:55 AM

  • Mapping issue in Date Format

    Hi Experts,
    I have a mapping problem in my object.
    I have two filelds coming from the Control record of an IDoc CREDAT and CRETIM. Now, I need to concate them and put them in a target field DateandTimeCreated in the format: YYYYMMDDHHMMSS
    Is their an UDF or message mapping for this. Messge mapping will be better for me.DateTrans will work over here??
    Please reply.
    Thanks and regards,
    Aniruddha

    Sample UDF code:
    Execution Type:  Single Values
    Date UDF
    a)if your input date field declared as string then,
    public String dateValue(String value,  Container container) throws StreamTransformationException{
    String input =value;
    String strDate ="";
    if (input !=null)
    Date date1 = new java.util.Date(Long.parseLong(input));
    SimpleDateFormat  formatter = new SimpleDateFormat("yyyyMMdd");
    strDate = formatter.format(date1);
    return strDate;
    Time UDF
    a) if your input time field declared as string then,
    public String timeValue(String value,  Container container) throws StreamTransformationException{
    String input = value;
    String strTime="";
    if (input !=null)
    Date date = new java.util.Date(Long.parseLong(input));
    SimpleDateFormat  formatter = new SimpleDateFormat("HHmmss");
    strDate = formatter.format(date);
    return strTime;
    Note: include import statement
    import java.text.*
    If you have question, let us know. This code will work for sure.

  • Issue with Date Format in line Graph X-AXIS

    Hi all,
    I have a line graph, with data in x-axis and integer values in y-axis.
    I am fetching data in Mon-dd-yyyy format but in graph (x-axis) it showing in yyyy-mm-dd format.
    How to change this format.
    Regards,
    Krishna Prasad

    Hi,
    Basically you are trying to convert a date into date which is not advisable. Hence convert it to char and then equate it against a character value. Also do not use trunc as it will trim out the time part of the date.
    select * from test
               where to_char(dob,'RRRR/MM/DD HH24:MI:SS')=:p1Then pass the parameter
    cheers
    VT
    Edited by: VT on Oct 26, 2010 4:16 PM

  • Issue with date formating

    Hi All,
    I  want to print the date in YYYYMMDD  format  in my coversheet template. Presently i am using DD.MM.YYY in the coversheet template .How to mask  this? ( No generation variant changes are applicable here)
    Please let me know your inputs in detail if possible.
    Thanks&regards
    George

    hi
    what i believe is the problem with your date profile
    to make the time as user time zone ,you need to make following settings
    Customer Relationship Management--->Basic Functions--->Date Management---->Define Date Profile
    Here for a Date Profile, u need to create the reference object adn then assign this object to your date type
    the date profile works in following way ,first we have to create our date type and assign the date rule to it and then assign this date type to the date profile
    so in similar way u need to first do changes in the refernce object ,which will be user user time zone in time
    and then assign it to the date profile
    Also after this just check inside the T code ZTAC
    hope it will end ur probs
    best regards
    ashish

  • Issue in date format while running from page

    Hi
    I have the following SQL which is well executing in DataBase...
    SELECT to_char(to_date('05-JUN-2010','DD-MON-YYYY'),'DD-MM-YYYY') param_Val FROM dual
    But when i am using the same query in the JSP page...
    it is giving the invalid month exception:1863
    Please Help me in this issue
    Thanks

    I got the solution to this problem.
    mm - stands for minutes
    MM - stands for month.
    When I changes the pattern to "MM-dd-yyyy". I got the correct month.

  • Date Format for the input Variable

    Hi all,
    I got an issue with Date format we enter in the input variable screen for the BEx Analyzer.
    We have given a format of MM/DD/YYYY. But when the users accessed the report, it is not taking the format of the variable i.e MM/DD/YYYY but it is taking the format of the users system.
    If the user's system format is DD/MM/YYYY, it is accepting the input inthe same format only.
    Why this strange behaviour?
    My questions are
    Is the input for BEx system specific? or variable specific?
    Rgrds
    Kumar

    Hi,
    I think it is user specific... you can maintain the date format for user ....
    Go to SU01 transaction or.. Go to SYSTEM -> User Profile -> Own data
    Here in defaults tab you can see the date formet for user...
    Hope this helps...
    Thanks,
    Vikrant Mahajan

  • "Date formatting not supported yet"??

    When I add imports to get around the problem described in my previous
    email, I run into an exception that says "Date formatting not supported
    yet". The exception is thrown in util/HtmlUtil.java. What's the
    intention here? Why don't we just return the value unformatted? How
    should I handle this so I can take advantage of the formatting if it is
    supported someday? Are there any other formatting types which I need
    to "handle" in order to run?

    Dan--
    When I add imports to get around the problem described in my previous
    email, I run into an exception that says "Date formatting not supported
    yet". The exception is thrown in util/HtmlUtil.java. What's the
    intention here? Why don't we just return the value unformatted? How
    should I handle this so I can take advantage of the formatting if it is
    supported someday? Are there any other formatting types which I need
    to "handle" in order to run?The exception lets you know that there is a specific issue you need to work
    around during migration. The reason we don't just return the unformatted
    value is that we didn't want to give the impression that date formatting
    worked when it doesn't (yet).
    If you just want the value to come through without an attempt at formatting,
    the correct thing to do is to change your JSP tags to eliminate the date
    formatting attributes. If this is a loss of data (the format masks), then
    you should just comment them out rather than delete them.
    The whole issue of date formatting is unfortunately complex. Suffice to say
    that it is far easier for the developer to format the date as they wish in
    their code then it is for us to try and provide generic date formatting.
    The issue revolves around having all the necessary information in order to
    do the formatting in a generic way.
    Todd

  • Date format in prompts

    Hi all,
    I'm having an issue with dates formats in infoview, I have users in different regions and they are seeing  different date formats and sometimes the reports show errors because of the date format. I don't want to tell the users to change their regional settings, is there an option to display the same date format in infoview using date types?
    Thank you,
    Marcela

    Hi Amr,
    Yes, I fixed issue, the problem was because I was using opendocument and I was sending the parameters like this:
    ="<a href=\"../../scripts/openDocument.aspx?sType=wid&sDocName=ReportName&sWindow=NEW&lsMPartnerId=" + [Partner Id] +"&lsSFrom=" [Reportdate]"&lsSTo="+RelativeDate([Reportdate];1) "\">" [Partner Name]"->"[Reportdate]+"</a>"
    The RelativeDate funtion was changing the format; the format for lsSFrom was different of the lsSTo format, I applied the same function for lsSFrom and lsSTo, and now it's working fine. I had this issue is some regions, not in all. Now they see different format but the reports are working fine.
    Best regards,
    Marcela

  • Date format within smartforms printing

    Hello,
    I have an issue regarding date format.
    When I print a delivery note date format is e.g. 08.04.2011, printing an invoice it shows 04-08-2011.
    It seems that depending on the customers country the invoice printing converts to date format within country settings
    (V_T005-DATFM) while delivery form doesn't.
    If I always want to print in date format of sales company what should I do?
    Thanks a lot,
    Wolfi.

    I guess, it should work if you define
    /: SET COUNTRY &country_key&
    in the Initialization section of your smartform.
    Note: The country-dependent formatting options are stored in the T005X table.
    Regards,
    SaiRam

  • Issue found in EHS in using specification data import using  process

    Dear EHS community
    Now using EHS classic for a long time a issue has been detected in EHS standard import. During maintenance of EHS data normally using CG02 the system is always using the default "Data origin" specified in customizing to be stored in EHS tables (e.g. ESTRH, ESTRI etc.). In standard process to import specification data one can define a different "Data origin". Now we are using an import file with default" data origin and executed the import. Now a strange effect has been detected (and not always) for update of identifiers. For the import purpose you must nominate at least one identifier. If the identifier is found then normally no update happens but only the value assignment data is inserted (or updated). If the identifier is not found it get be inserted on spec level in ESTRI. Now during the update the "Data origin" of the identifier present in the system (and which matched to identifier on file level) was changed but not the identifier as such. Any data record on value assignment level received the defautl data origin. Actually there is no explanation for this behaviour. If Default "Data origin" would be "SAP" (as the term) this value has been change to "Space". Any explanation of this effect is appreciated (or and idea regarding that).
    C.B.
    PS: analysis of change logs in EHS etc. executed so far clearly indictae that an "Update" happened on the identifier; but only the field SRSID is effected; EHS import is quite old and therefore very stable;
    PPS: I found a thread taking about the import file:
    spec import_inheritance data
    Example shown thre is like:
    +BS
    +BV   $ESTRH
    SRSID                          EH&S
    SUBID                          000000385000
    SUBCAT                         REAL_SUB
    AUTHGRP                        EHS_PS
    +EV
    +BV   $ESTRI
    SRSID                          EH&S
    IDTYPE                         NAM
    IDCAT                          EHS_OLD
    IDENT                          XY0002
    ORD                            0001
    +EV
    +BV   SAP_EHS_1013_001
    $ESTVA-SRSID                   EH&S
    SAP_EHS_1013_001_VALUE         N09.00101280
    +EV
    If you compare SAP helpt normally only at the"begining pof the file you will find "SRSID" Here this field is nominated often. On Level of ESTRH as well as ESTRI.
    PPS: e.g. refer to: TCG56 EHS: Data Origin - SAP Table - ABAP

    Dear Ralph
    first thanks for feedback. Regarding content provider: we need to check that on deeper level
    Regarding import may be my explanation was not good enough.
    Imagine this case:
    you have a specification in the system there you would like to add e.g. denisity data.. To do so you need at least one identifier which you must nominate during the import. As long as this identifier is "identical" in system and in the file this identifier should not be "changed/effected" etc. and only the additional data should be loaded, This was the process we used. Now we detected that this seems not to be the real effect. The identifier as part of the file is "updated" in EH&S. In the example above somebody used this logic:
    +BV   $ESTRI
    SRSID                          EH&S
    IDTYPE                         NAM
    IDCAT                          EHS_OLD
    IDENT                          XY0002
    ORD                            0001
    +EV
    Nearly the same is used in our process. Only difference ist, that we do not define the "SRSID". The same is true for any other data in the file. SRSID is nether specified.
    What is happing now:
    e.g. the "density" data is added with SRSID "EH&S". This effect is "normal". As by default SRSID should be EH&S (as this is defined as such in customizing) and because of the fact that at the top the ID is es well "EH&S". In the system we have the "XY0002" having SRSID EH&S. By using now this upload approach the only difference afterwards is tht kin th systeM; XY0002 does get "blank" as SRSID (and there is no data origin "blank" defined. Up to today my unertsanding was clearly: no update should happen in the identifier. This seems not to be the case. Is my understanding here different? Or is this SRSID in the load file is really mandatory in ESTRI level to avoid this effect. I hope that you can provide some feedback regarding this.
    C.B.
    PS: referring to: Example: Transfer File for Specifications - Basic Data and Tools (EHS-BD) - SAP Library
    The header of import file should look like:
    Comment
    +C
    Administrative section
    Character standard
    +SC
    ISO-R/3
    Identification (database name)
    +ID
    IUCLID
    Format version
    +V
    2.21
    Export date
    +D
    19960304
    Key date for export
    +VD
    19960304
    Set languages for export
    +SL
    E
    Date format
    +DF
    DD.MM.YYYY
    IN our case +ID = EH&S (as this is the value in export file)
    IN this example this additional one is shown:
    Begin table
    +BV
    $ESTRI
      Table field
    IDTYPE
    NAM
      Table field
    IDCAT
    IUPAC
      Table field
    IDENT
    anisole
      Table field
    LANGU
    E
      Table field
    OWNID
    ID1
    Therefore no SRSID is specified. And this is the data in our file (on high level) and the "only" change is that the identifer get "deleted" the SRSID

Maybe you are looking for

  • WCServer error

    I am using jdev 11.1.1..7 I get below stack trace when i try to run project <WebCenterConfig> <_createConfigMapSnapshot> An error occurred reading a service's configuration. oracle.adf.share.ADFShareException: java.lang.NullPointerException   at orac

  • HTMLB how to get checkbox value?

    Hi all, anyone knows how is possible to get the value of a checkbox in a DynPage? Example:   <hbj:checkbox        id="CheckCPUStat"        text="CPU status"        key="chk_Stat"   /> In this case i want to read the string "CPU status". If I use the

  • HI I am having the following error message in Package Builder please help?

    Wed Jun 19 08:23:11 2013 [INFO] AdobePackageBuilder - Build Version - 1.0.0.54 Wed Jun 19 08:23:11 2013 [INFO] AdobePackageBuilder - Logging Level verbosity Set  to 4 Wed Jun 19 08:23:12 2013 [INFO] AdobePackageBuilder - START utilCopySrcFolderToDstF

  • Acrobat 9 scans Landscape but auto corrects to Portrait

    I have a user who scans a landscaped document and Acrobat auoto corrects it to Portrait.  Which is fine for viewing but some times they have to print these out and it looks like garbage. I do not want to set the "New Doc" options to lansdscape becaus

  • Clock skew possibly caused by suspend/resume

    In an attempt to save electricity, my girlfriend has started suspending her desktop.  She started complaining that the clock was off, in spite of the fact that I have ntp running.  I think that what is happening is that when she suspends it, the time