Yyyy-mm-dd Field

Post Author: Pursuit
CA Forum: Crystal Reports
How can i change my Parameter Field Type "Date" so it requests the date as dd-mm-yyyy and not yyyy-mm-dd

Post Author: Crystal Fire
CA Forum: Crystal Reports
If you need to display the parameter it would be like this
"For Dates Between "+ ToText(Minimum({?Date (  Date )}),"yyyy/M/d")" and "ToText(Maximum({? Date ( Date )}),"yyyy/M/d")

Similar Messages

  • Date Field in Hierarchical ALV

    Hello Friends,
    I have a few fields in my Hierarchical ALV output which are initially hidden.
    When I choose to display these fields by changing the Layout the date fields come out in the form
    MMDDYYYY
    I need those fields as 
    MM/DD/YYYY
    The date fields which are NOT hidden initially  are in the format MM/DD/YYYY. No problem there.
    When I go to settings and choose column width optimize I am then able to see these date fields as MM/DD/YYYY.
    In My code I already set this col width to optimize. It is also working . But for fields which are hidden initially I have to explicitly set the width optimize again .
    This problem is not there in GRID ALV.
    Why is the HIER ALV not putting the date fields in MM/DD/YYYY format.

    Hi,
    Just pass the Edit option of the fieldcatalog for those specific fields...
    fcat-edit = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-cprog
          i_callback_pf_status_set = 'PF_STATUS_SET'
          i_callback_user_command  = 'USER_COMMAND'    "<----  pass this
          i_callback_top_of_page   = 'TOP'
          is_layout                = it_layout
          it_fieldcat              = it_fcat
          i_default                = 'X'
          i_save                   = 'A'
          it_events                = it_event
        TABLES
          t_outtab                 = it_final
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    *&      Form  USER_COMMAND
    *       text
    *      -->R_UCOMM      text
    *      -->RS_SELFIELD  text
    FORM user_command USING r_ucomm LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&DATA_SAVE'.                "<-------check this
          PERFORM save_data.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND

  • Modify form field properties

    This question was posted in response to the following article: http://help.adobe.com/en_US/acrobat/pro/using/WS58a04a822e3e50102bd615109794195ff-7df8.w.h tml

    This is not easily scripted as yo need to provide the exact date pattern you want to use.
    You can run the following script through your JavaScript console in Acrobat,. You will need to modify the field names and date format as needed to meet your needs.
    // define an array of fields to change
    var aFields = new Array("Text1", "Text2", "Text3", "Textn");
    // define a character string for the date format
    var cDateFormat = "dd-mmm-yyyy";
    // define a field object to be used for setting the date format
    var oField;
    // loop through the field names and add the date format
    for(i = 0; i < aFields.length; i++) {
    // get the field object for i element in aFields
    oField = this.getField(aFields[i]);
    // set the date format
    oField.setAction("Format", AFDate_FormatEx( cDateFormat));
    // end loop field names - get next field name for processing
    The Acrobat JavaScript Console (Your best friend for developing Acrobat JavaScript)
    There are other tools and methods to make forms besides the form Wizard. Most of us avoid it for most forms.

  • Want to break down a date into 4 lines in one field

    Hi all,
    In report 10g , when a date value mask is like 'DY. MON. DD,YYYY' in a field,
    it will be display whole date 'Mon. Apr.14,2008' in one line
    but in the report i want it shows like below in one field (break in every word, four lines) because the filed honrizontal width is limited
    Mon.
    Apr.
    14,
    2008
    how can i reach this in format trigger, i already use srw.set_value(0, to_char(sysdate))
    but doesn't work.
    Thanks for your help!
    appcat

    Try this
    select to_char(hiredate, 'Dy.') || chr(10) || to_char(hiredate, 'Mon.') || chr(10) || to_char(hiredate, 'dd,') || chr(10) || to_char(hiredate, 'yyyy') cdate
    from emp
    It was just an example. Use chr(10) for carriage return, whereever it is needed.

  • Date format in parameter field type date

    Post Author: Luciano Brandao
    CA Forum: Crystal Reports
    Hi I need show /input date format dd-mm-yyyy in paramters field type date when Crystal prompt parameter to user. I used Crystal 11 Can help-me ? thanks

    Post Author: Crystal Fire
    CA Forum: Crystal Reports
    Put this in the page header to show the date parameters chosen for the report. Make sure you change the select expert for the date field to = ?{date field}
    "All Posting Dates Between "+ ToText(Minimum({?date field}),"M/d/yyyy")" and "ToText(Maximum({?date field}),"M/d/yyyy")

  • Field contents to right justfied

    Hi,
      I am working on BDC program -ME11
        On the text overveiw screen, I need to insert data into the first line and the data should be right justified.
    I am working on 4.5Bversion.
    Field is RM06I-LTEX1 TYPE C AND LENGHT IS 40 which i have in the internal table
    Can any one tell how to write the code so that data is entered on the screen with spaces before.
    the number of characters for this field in the flat file is not constant. it will be 4 or 5.
    LTEX1: /010
    should be displayed as
    LTEX1:                             /010

    Hi,
      Try to use the following code:
    write :/ xxxxx to yyyy right-justified.
    Here XXX is your source field and YYYY is your field where is spaces will be present at the front.

  • Create Dynamic variant for date field

    Hello all,
    I need to have the current month year displayed in my selection screen in format MM.YYYY and the field is of type SPMON (Period to analyze - month).
    and while saving the variant it is showing only 'T' (entries from TVARVC table)  in  "selection variable" field and not showing 'D' (Dynamic selection) for the above field.
    So,please help me in resolving this issue.
    Thanks in advance.

    hi
    good
    go through this code,i hope this ll help you to create the dynamic variant.
    Please find the sample using RS_CREATE_VARIANT (FM).
    It make use of other FM also , just have a look .
    Hope this may help you.
    REPORT ZEXAMPLE.
    DATA: JVARI_DESC LIKE VARID,
    RC LIKE SY-SUBRC,
    VARIANT_TEXT LIKE VARIT-VTEXT,
    JVT LIKE VARIT OCCURS 0 WITH HEADER LINE,
    SELPA LIKE RSPARAMS OCCURS 0 WITH HEADER LINE,
    PARMS LIKE RSPARAMS OCCURS 0 WITH HEADER LINE,
    OBJS LIKE VANZ OCCURS 0 WITH HEADER LINE.
    PARAMETERS: P_VAR LIKE RSVAR-VARIANT. "NAME OF VARIANT
    JVARI_DESC-REPORT = SY-REPID.
    JVARI_DESC-VARIANT = P_VAR.
    JVARI_DESC-ENAME = 'EXAMPLES'.
    JVT-REPORT = SY-REPID.
    JVT-VARIANT = P_VAR.
    JVT-LANGU = SY-LANGU.
    JVT-VTEXT = 'FUNCTION EXAMPLES'.
    APPEND JVT.
    CLEAR SELPA.
    SELPA-SIGN = 'I'.
    SELPA-OPTION = 'EQ'.
    SELPA-KIND = 'P'.
    SELPA-SELNAME = 'P_VAR'.
    SELPA-LOW = P_VAR.
    APPEND SELPA.
    CHECK IF VARIANT EXISTS
    CALL FUNCTION 'RS_VARIANT_EXISTS'
    EXPORTING
    REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    IMPORTING
    R_C = RC
    EXCEPTIONS
    NOT_AUTHORIZED = 1
    NO_REPORT = 2
    REPORT_NOT_EXISTENT = 3
    REPORT_NOT_SUPPLIED = 4
    OTHERS = 5.
    IF RC = 0 AND SY-SUBRC EQ 0.
    DELETE OLD VARIANT
    CALL FUNCTION 'RS_VARIANT_DELETE'
    EXPORTING
    REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    FLAG_CONFIRMSCREEN = 'X'
    EXCEPTIONS
    NOT_AUTHORIZED = 1
    NOT_EXECUTED = 2
    NO_REPORT = 3
    REPORT_NOT_EXISTENT = 4
    REPORT_NOT_SUPPLIED = 5
    VARIANT_LOCKED = 6
    VARIANT_NOT_EXISTENT = 7
    NO_CORR_INSERT = 8
    VARIANT_PROTECTED = 9
    OTHERS = 10.
    IF SY-SUBRC NE 0.
    WRITE: 'UNABLE TO DELETE VARIANT:', P_VAR ,'STATUS=', SY-SUBRC.
    EXIT.
    ELSE.
    WRITE:/ P_VAR, 'DELETED'.
    ENDIF.
    ELSE.
    WRITE:/ P_VAR, 'DOES NOT EXIST'.
    ENDIF. " ALREADY EXISTS
    CALL FUNCTION 'RS_CREATE_VARIANT'
    EXPORTING
    CURR_REPORT = JVARI_DESC-REPORT
    CURR_VARIANT = P_VAR
    VARI_DESC = JVARI_DESC
    TABLES
    VARI_CONTENTS = SELPA
    VARI_TEXT = JVT
    EXCEPTIONS
    ILLEGAL_REPORT_OR_VARIANT = 1
    ILLEGAL_VARIANTNAME = 2
    NOT_AUTHORIZED = 3
    NOT_EXECUTED = 4
    REPORT_NOT_EXISTENT = 5
    REPORT_NOT_SUPPLIED = 6
    VARIANT_EXISTS = 7
    VARIANT_LOCKED = 8
    OTHERS = 9.
    IF SY-SUBRC EQ 0.
    WRITE:/ 'VARIANT', P_VAR, 'CREATED FOR PROGRAM', JVARI_DESC-REPORT.
    ELSE.
    WRITE:/ 'VARIANT', P_VAR, 'NOT CREATED FOR PROGRAM', JVARI_DESC-REPORT.
    EXIT.
    ENDIF.
    CALL FUNCTION 'RS_VARIANT_CONTENTS'
    EXPORTING
    REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    TABLES
    VALUTAB = PARMS
    OBJECTS = OBJS
    EXCEPTIONS
    VARIANT_NON_EXISTENT = 1
    VARIANT_OBSOLETE = 2
    OTHERS = 3.
    IF SY-SUBRC NE 0.
    WRITE : / 'ERROR READING VARIANT CONTENTS.'.
    ELSE.
    CALL FUNCTION 'RS_VARIANT_TEXT'
    EXPORTING
    LANGU = SY-LANGU
    CURR_REPORT = JVARI_DESC-REPORT
    VARIANT = P_VAR
    IMPORTING
    V_TEXT = VARIANT_TEXT.
    WRITE:/ 'VARIANT DESCRIPTION:', VARIANT_TEXT.
    LOOP AT PARMS.
    CHECK PARMS-LOW NE SPACE OR PARMS-HIGH NE SPACE.
    READ TABLE OBJS WITH KEY NAME = PARMS-SELNAME.
    WRITE : /2 PARMS-SELNAME, OBJS-TEXT,
    45 PARMS-KIND,
    PARMS-SIGN,
    PARMS-OPTION,
    PARMS-LOW,
    PARMS-HIGH.
    NEW-LINE.
    ENDLOOP.
    SKIP.
    ENDIF.
    some other approach....
    This function module selects the Selection Screen contents
    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
    EXPORTING
    curr_report = sy-repid
    TABLES
    selection_table = loc_int_tab
    EXCEPTIONS
    not_found = 1
    no_report = 2
    OTHERS = 3.
    IF sy-subrc NE 0.
    MESSAGE i000 WITH 'Error in RS_REFRESH_FROM_SELECTOPTIONS'(029).
    LEAVE LIST-PROCESSING.
    ENDIF.
    Craete the variant VAR1
    CALL FUNCTION 'RS_CREATE_VARIANT'
    EXPORTING
    curr_report = sy-repid
    curr_variant = wf_variant
    vari_desc = loc_varid
    TABLES
    vari_contents = loc_int_tab
    vari_text = loc_varit
    EXCEPTIONS
    illegal_report_or_variant = 1
    illegal_variantname = 2
    not_authorized = 3
    not_executed = 4
    report_not_existent = 5
    report_not_supplied = 6
    variant_exists = 7
    variant_locked = 8
    OTHERS = 9.
    IF sy-subrc <> 0.
    MESSAGE i000 WITH 'Error while creating dynamic variant'(028).
    LEAVE LIST-PROCESSING.
    ENDIF.
    reward point if helpful.
    thanks
    mrutyun^

  • TFS SSRS bug age report

    Hello,
    I want to create pie chart report which will display bug counts according to their age i.e. within last month, 1-3 month old and 3+ month ago.
    I have got dataset (TFS2010Olap as data source) which is displaying 2 columns, System_CreatedDate and WorkItem_count. I want to create group expression at chart level so it categories
    source data and display on chart accordingly.
    I am using this expression in categoryGroup of pie chart:
    =iif(CDate(Fields!System_CreatedDate.Value) > DateAdd("m", -1, now), "Within Previous Month", iif(CDate(Fields!System_CreatedDate.Value) > DateAdd("m", -3, now), "1-3 Months Old", "3+ Months Old"))
    but I am getting error: Conversion from string "22/01/2012" to type "Date" is not valid. I tried to do with function
    "DateDiff" but getting same error. Please let me know what I am missing or wrong in the expression? I had a look at MSDN post with title "SSRS
    Report to calculate Bug Age" but getting this date conversion problem.
    I tried to format date as well but getting format error again:
    =iif(cdate(format((Fields!System_CreatedDate.Value),"dd/MM/yyyy")) > format(DateAdd("m", -1, now),"dd/MM/yyyy"), "Within Previous Month",
    iif(cdate(format((Fields!System_CreatedDate.Value),"dd/MM/yyyy")) > format(DateAdd("m", -3, now),"dd/MM/yyyy"), "1-3 Months Old", "3+ Months Old"))

    Hi gajeshm,
    I have tested on my local environment and can reproduce the issue,  the issue caused by the format of the
    System_CreatedDate which is "dd/MM/yyyy" and not supportted as the date type in the report but instead of string type. You need to convert this field to the string format "MM/dd/yyyy" and then using the CDate()
    function to change it the Date type (because the format "dd/MM/yyyy" which is not support to use directly in the CDate() function, so we need to change it to "MM/dd/yyyy" using the split() function and this format will support to use in
    the CDate() function).
    Details information below for your reference:
    Right click the dateset to add calculated field(NewSystem_CreateDate) and use expression as below, this calculated field will display the NewSystem_CreateDate which is the datetype and format is "MM/dd/yyyy":
    =Cdate(split(Fields!System_CreatedDate.Value,"/")(1) &"/"& split(Fields!System_CreatedDate1.Value,"/")(0)&"/"&split(Fields!System_CreatedDate.Value,"/")(2))
    Modify the first expression you have provided and change the "System_CreatedDate" to the Calculated field "System_CreatedDate":
    =iif(Fields!NewSystem_CreatedDate.Value> DateAdd("m", -1, now), "Within Previous Month", iif(Fields!NewSystem_CreatedDate.Value > DateAdd("m", -3, now), "1-3 Months Old", "3+ Months Old"))
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

  • How to dynamically assign Display Pattern using FormCalc in Adobe PDF Form

    I am using Adobe PDF Form Designer. I am trying to dynamically assign a display pattern like MM/DD/YYYY to the Field tab - Display Pattern property. May I know how to do that?
    I am using FormCalc scripting.

    hi,
    After placing the date field in layout from data view, u will get tabs like field,layout,border etc..
    In field tab under the edit pattern specify the pattern in which you want to display the date field.
    hope this works.
    Reward points if helpful.

  • BEx Query Designer 2 years comparison by month

    Hi expert,
    I'm drafting a report which want to comparison 2 years cost variance. I want to have 2 column inofmraiton, Cost & Variance % (which is  (Current Period - Previous Period) * 100/ Previous Period)  .
    I create the follow fields & defined a value range of  'CalYear/Month' in Filter of Characteristic Restrictions with variable offset value -12 which can input From mm.yyyy & To mm.yyyy.
    1. Characteristic of 'Cost'
    2. 'Cost -12' which is Cost with restriction of 'CalYear/Month' in 'From mm.yyyy' -12 to 'To mm.yyyy' -12 (HIDE FIELD)
    3. 'Variance %' which use function [ 'Cost' % 'Cost -12']
    After I Inputted the value of From Value 04.2011 & To Value 06.2011, it show 6 column of the cost in Apr 2010, May 2010, Jun 2010, Apr 2011, May 2011, Jun 2011, It show 0 under the 'Variance %' of Apr 2010, May 2010 & Jun 2010 is correct, but it can't calculate the any value of Variance % under Apr 2011, May 2011 & Jun 2011.
    Please advice
    Thanks & Regards
    Jack

    Create a CKF/formulae - then use Data Functions.
    Use SUMGT operator.
    SUMCT:
    It returns the result of the operand to all rows or columns
    SMGT:
    It returns the overall result of the operand
    SUMRT:
    It returns the query result of the operand
    How to use sumct, sumgt and sumrt
    http://help.sap.com/saphelp_nw04/helpdata/en/03/17f13a2f160f28e10000000a114084/frameset.htm
    Regards,
    rvc

  • SQL Query Posting the Data Properly but Generating An Error

    I've created a SQL query to update records in a database.  While testing I used an Access database and it worked perfectly.  To go into production I've moved the data to SQLServer 2005 installed on my xMII server.  The SQL syntax is different for handling dates between the two databases so I modified my queries accordingly.  I now have:
    UPDATE ControlLimits SET Metric_ID='[Param.1]', CDate='[Param.2]', LCL=[Param.3], Mean=[Param.4], UCL=[Param.5]
    Where  (Metric_ID='[Param.1]' and CDate = '[Param.2]')
    CDate is my date field being passed in the format 'mm/dd/yyyy', the table field is formatted for datetime - the same as in Access.
    When running this query (with the [Param.x]'s being replaced with actual values)through SQL Server Management Studio on the xMII server, it works just fine.  When run as a query template, the data is posted properly to the table but the template returns a 'A SQL Error has occurred on query, The statement did not return a result set..' 
    Any ideas?
    David

    Udayan,
    You are absolutely correct!  When I did it in Access I was correctly using the Command mode.  When I moved to the SQL Server data source in my query template, I picked the Fixed Query mode by mistake.
    Thanks for your help!
    Regards,
    David

  • Date Format in LSMW

    Hi,
    I'm using Direct Input method to post documents for FB01.
    The date fields in header BUDAT and BLDAT has format yyyymmdd
    But FB01 transactions expects date field to be in format mm/dd/yyyy.
    I'm not able to assign directly any date of format mm/dd/yyyy to these fields in field mapping.
    Can you pls help me in this?
    Thanks

    Hi,
    In SAP all date fieldsa re stored in YYYYMMDD format only
    You can assign the same date to that field or assign SY-DATUM to that field
    You can convert the format using EDIT MASK
    or split the date,month and year and concatenate and can use
    Reward points if useful
    thanks
    Vana

  • Dump in Inner join

    Hi ,
        I am selecting data (Around 100 fields)from 4 different tables(a,b,c,d) using INNER JOIN .I get the Runtime error (DUMP) SAPSQL_AMBIGUOUS_FIELDNAME  .Since one of the selection field is availble in both c & d tables but i need that to be selected from c alone.
    Now i have used Select * to select the fields.
    SELECT *
    INTO CORRESPONDING FIELDS OF TABLE int_tab
    FROM a AS a INNER JOIN b AS b
    ON a~key1 = b~key1
    INNER JOIN c as c
    on c~key2 = a~key2
    INNER JOIN d as d
    on d~key2 = a~key2
    where......
    thanks,
    srini

    Hi Chellama,
    although this thread is already passed, you might be interested in understanding the use of an ALIAS in open SQL clauses:
    You can use the AS clause to define a new name (alias) for a fieldname or table name.
    Use select a b c as d into corresponding fields of destination if you want the values of fields a and b to be moved to fields a and b of the destination structure but the value of field c to go to field d of destination structure.
    For table names it is the same logic. Yor sample code
    select a~ xxxx
    a~key1
    b~key1
    b~yyyy
    INTO CORRESPONDING FIELDS OF TABLE int_tab
    FROM a AS db_tab1 INNER JOIN b AS db_tab2
    ON a~key1 = b~key1
    is syntactically wrong because you defined the alias db_tab1for table a and db_tab2 for table b. Now the fields akey1 and so on are unknown, you could use only db_tab1key1 etc.
    In Join conditions, you will almost never need an alias clause. Corrected code is
    select a~xxxx
    a~key1
    b~key1
    b~yyyy
    INTO CORRESPONDING FIELDS OF TABLE int_tab
    FROM a
    INNER JOIN b
    ON a~key1 = b~key1
    This is much more transparent for the one who has to read and understand the code.
    Regards,
    Clemens

  • Migration Issues from Informix to Oracle (datetime format)

    Hello, i am performing a Migration from Informix to Oracle, drive by Migration Workbench, i have an error migrating data from datetime and date fields. I suppose its related by datetime and date format, cause the error tells "Incorrect day or month" when i am migrating data from informix. Targets Oracle database date format is DD/MM/YYYY and source`s Informix database date format like MM/DD/YYYY. Is there any way, in OMW, to specify the mask of datetime or date format to convert date strings from informix to oracle format? Or have i got migrate offline and modify control file to do that with sql*loader?
    How can i do that?
    Example, especify to_date('....', 'MM/DD/YYYY H24:MI:SS') format for migrating informix datetime fields to Oracle.

    The problem i have is, several tables witch contains date and datetime fields, at the same table in informix, by migrating drive by omwb to oracle, the date format i receive from informix at reading is DD/MM/YYYY and datetime format receiving is HH24:MI:SS. Migrating date and datetime types from informix to date, both types to date in oracle, i get an error while matching DD = HH24, MM = MI and YYYY = SS where nls_date_format is DD/MM/YYYY and, the same error matching HH24 = DD, MI = MM and SS = YYYY when nls_date_format is HH24:MI:SS.
    If i set nls_date_format as "DD/MM/YYYY HH24:MI:SS" i get the same error, cause reading data from informix results in data format "DD/MM/YYYY" for date fields and "HH24:MI:SS" for datetime fields.
    I have more than 200 tables in informix with this problem to migrate to oracle, i can solve by migrating offline, modifying datacontrol file to casting to_date format, but over 200 tables, 200 datacontrol files... is there any way for solving that by online migration in omwb?

  • BIP & trying to auto-set the current date for a parameter

    I'm trying to allow for a date selector as a parameter for one of my reports. This is BIP 11.1.1.5.
    I've set up a field for the parameter and can pass it into the report but want to see if I can auto-fill this field with today's date, and then set the Date From to today and the Date To to 3 days from now. Is this possible? Is there a way to do something like "format-date:sysdate('MM/dd/YYYY');" in these fields? I've attached an image of my fields in my Data Model.
    My image - http://goo.gl/mcXS7
    Thanks.
    Edited by: thejame on Jun 7, 2011 9:38 AM

    Thank You! I came across this before but never saw you have to use the {$ to get to the value.
    {$SYSDATE()$} gets me today's date.
    So can I use these in the BIP's Query Builder or other areas where I want to populate fields?
    Example: I want to use it in the actual report's parameters but it just comes across as "{$SYSDATE()$}"

Maybe you are looking for