Date format in a parameter field (help)
Post Author: binsk
CA Forum: Formula
Hi Guys,
Newbie in CR world.
I need help in changing the date format in parameter field. present setting is YYYY/MM/DD. I need it in DD/MM/YYYY. How is it to be done? My db is running in oracle. I'm using the CR XI version.
Thanks ahead.
Alex
Post Author: Aman
CA Forum: Crystal Reports
Thank you for your response Yangster.
However, the below formula did not work, it gives me a message that "this field name is not known" {?end_date}.
date_field in dateadd("d", -100, {?end_date}) to {?end_date}
Am I not inputing this right? or do need a different formula/method?
Please help...
Thank you,
Similar Messages
-
Date Formatting in a Result Field: Crystal Reports 2008
I'm modifying a report at runtime in c# .Net using Crystal Reports 2008.
I'm having trouble modifying a date fields format. I have accessed the DateFieldFormat object, and modified the properties, but only the SystemDefaultType property seems to have any affect.
If the Date format is set in the Visual Report Designer I can see the details of the format in DateFieldObject, but editing these values doesn't have any affect on the report once displayed.
Here is a sample of the code i'm using:
public Form1()
InitializeComponent();
CrystalDecisions.CrystalReports.Engine.ReportDocument reportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
ISCDReportClientDocument reportClientDocument;
// Load Report
reportDocument.Load(@"C:\myReport.rpt");
reportClientDocument = reportDocument.ReportClientDocument;
// Access Field
FieldObject fieldObject = (FieldObject)reportClientDocument.ReportDefinition.DetailArea.Sections[0].ReportObjects["DateField1"];
// These work, if I want to use one of the default formats
// fieldObject.FieldFormat.DateFormat.SystemDefaultType = CrDateSystemDefaultTypeEnum.crDateSystemDefaultTypeUseLongDate;
// fieldObject.FieldFormat.DateFormat.SystemDefaultType = CrDateSystemDefaultTypeEnum.crDateSystemDefaultTypeUseShortDate;
// I don't want to use one of the defaults.
fieldObject.FieldFormat.DateFormat.SystemDefaultType = CrDateSystemDefaultTypeEnum.crDateSystemDefaultTypeNotUsingDefaults;
// I want to change the order of the values
fieldObject.FieldFormat.DateFormat.DateOrder = CrDateOrderEnum.crDateOrderDayMonthYear;
// Display the report in the viewer
crystalViewer.ReportSource = rpt.rcd.ReportSource;
I'm assuming I'm missing something about the object model here, but I can't find any good reference to it. Can someone help me out?
Thanks!Hello,
I find using the Object Browser in .NET IDE is very useful. Or look for the Developers help file
The API you are using is not the one to use. Try this one:
public virtual CrystalDecisions.Shared.DayFormat DayFormat { set; get; }
Member of CrystalDecisions.CrystalReports.Engine.DateFieldFormat
Thank you
Don -
Sales Order and obligatory material's parameter fields - help!!!
Hi,
My problem is:
I've got to create material in MM by using BAPI_MATERIAL_SAVEDATA, so that this material can be later used as an item in Sales Order (SD). Do you know what parameter fields from which structures are obligatory in my case? I've already passed quite a lot of data to this BAPI, but I still get following error:
"Material myMaterial is not defined for sales org. 4000, distr.chan. 01, language FI"
Any suggestion will be appreciated and properly rewarded if useful.
My Java source-code is available below. Check this out and let me know what is missed.
* HEADDATA FOR BASIC VIEW
Structure headData = input.getStructure("HEADDATA");
headData.setValue(_material, "MATERIAL");
headData.setValue("1", "IND_SECTOR");
headData.setValue(_matl_type, "MATL_TYPE");
headData.setValue("X", "BASIC_VIEW");
headData.setValue("X", "SALES_VIEW");
//headData.setValue("X", "MRP_VIEW");
headData.setValue("E", "INP_FLD_CHECK");
* CLIENTDATAX FOR BASIC VIEW
Structure clientDatax = input.getStructure("CLIENTDATAX");
clientDatax.setValue("X", "MATL_GROUP");
clientDatax.setValue("X", "OLD_MAT_NO");
// clientdatax.setValue("X", "PROD_HIER");
clientDatax.setValue("X", "BASE_UOM_ISO");
clientDatax.setValue("X", "NET_WEIGHT");
clientDatax.setValue("X", "UNIT_OF_WT_ISO");
clientDatax.setValue("X", "ITEM_CAT");
clientDatax.setValue("X", "PUR_VALKEY");
clientDatax.setValue("X", "LABEL_TYPE");
clientDatax.setValue("X", "LABEL_FORM");
clientDatax.setValue("X", "DIVISION");
* CLIENTDATA FOR BASIC VIEW
Structure clientData = input.getStructure("CLIENTDATA");
clientData.setValue("02", "MATL_GROUP");
clientData.setValue("testmaterial", "OLD_MAT_NO");
// clientdata.setValue("1000000790","PROD_HIER");
clientData.setValue("PCE", "BASE_UOM_ISO");
clientData.setValue(0.111, "NET_WEIGHT");
clientData.setValue("KGM", "UNIT_OF_WT_ISO");
clientData.setValue("NORM", "ITEM_CAT");
clientData.setValue("UV03", "PUR_VALKEY");
clientData.setValue("1", "LABEL_TYPE");
clientData.setValue("E1", "LABEL_FORM");
clientData.setValue("01", "DIVISION");
* SALESDATAX
Structure salesDatax = input.getStructure("SALESDATAX");
salesDatax.setValue("4000","SALES_ORG");
salesDatax.setValue("01","DISTR_CHAN");
salesDatax.setValue("X","ITEM_CAT");
salesDatax.setValue("X","DELYG_PLNT");
* SALESDATA
Structure salesData = input.getStructure("SALESDATA");
salesData.setValue("4000","SALES_ORG");
salesData.setValue("01","DISTR_CHAN");
salesData.setValue("NORM","ITEM_CAT");
salesData.setValue("4200","DELYG_PLNT");
* PLANTDATAX
Structure plantDatax = input.getStructure("PLANTDATAX");
plantDatax.setValue("4200", "PLANT");
plantDatax.setValue("X", "MRP_TYPE");
plantDatax.setValue("X", "MRP_CTRLER");
plantDatax.setValue("X", "REORDER_PT");
plantDatax.setValue("X", "MINLOTSIZE");
plantDatax.setValue("X", "LOADINGGRP");
* PLANTDATA
Structure plantData = input.getStructure("PLANTDATA");
plantData.setValue("4200", "PLANT");
plantData.setValue("ND", "MRP_TYPE");
plantData.setValue("001", "MRP_CTRLER");
plantData.setValue("0", "REORDER_PT");
plantData.setValue("100", "MINLOTSIZE");
plantData.setValue("0001", "LOADINGGRP");
* MATERIALDESCRIPTION EN
Table materialDesc = tables.getTable("MATERIALDESCRIPTION");
materialDesc.appendRow();
materialDesc.setValue("ENGLISH", "LANGU");
materialDesc.setValue("EN", "LANGU_ISO");
materialDesc.setValue(_material+" - test for sales order", "MATL_DESC");
* MATERIALDESCRIPTION FI
materialDesc.appendRow();
materialDesc.setValue("FINNISH", "LANGU");
materialDesc.setValue("FI", "LANGU_ISO");
materialDesc.setValue(_material+" - test FI", "MATL_DESC");
// materialdesc.insertRow(0);
// MeasureX
Table measurex = tables.getTable("UNITSOFMEASUREX");
measurex.appendRow();
measurex.setValue("X", "ALT_UNIT_ISO");
measurex.setValue("X", "UNIT_DIM_ISO");
measurex.setValue("X", "LENGTH");
measurex.setValue("X", "WIDTH");
measurex.setValue("X", "HEIGHT");
measurex.setValue("X", "VOLUME");
measurex.setValue("X", "VOLUMEUNIT_ISO");
measurex.setValue("X", "GROSS_WT");
measurex.setValue("X", "UNIT_OF_WT");
measurex.setValue("X", "UNIT_OF_WT_ISO");
// measurex.insertRow(0);
// Measure
Table measure = tables.getTable("UNITSOFMEASURE");
measure.appendRow();
measure.setValue("PCE", "ALT_UNIT_ISO");
// measure.setValue("X","DEL_FLAG");
measure.setValue("CMT", "UNIT_DIM_ISO");
measure.setValue(0.111, "LENGTH");
measure.setValue(0.111, "WIDTH");
measure.setValue(0.111, "HEIGHT");
measure.setValue(0.3, "VOLUME");
measure.setValue("CMQ", "VOLUMEUNIT_ISO");
measure.setValue(0.111, "GROSS_WT");
measure.setValue("KGM", "UNIT_OF_WT");
measure.setValue("KG", "UNIT_OF_WT_ISO");
//Tax classifications
Table tax = tables.getTable("TAXCLASSIFICATIONS");
tax.appendRow();
tax.setValue("FI", "DEPCOUNTRY");
tax.setValue("FI", "DEPCOUNTRY_ISO");
tax.setValue("MWST", "TAX_TYPE_1");
tax.setValue("1", "TAXCLASS_1");
//tax.setValue("01", "TAX_IND");
tax.appendRow();
tax.setValue("EN", "DEPCOUNTRY");
tax.setValue("EN", "DEPCOUNTRY_ISO");
tax.setValue("MWST", "TAX_TYPE_1");
tax.setValue("2", "TAXCLASS_1");Hi Alistair,
I have a full access to SAP, so I can create and extend material whenever I want through MM01/MM02, but my target is to develop a method in Java, which creates a fully functional material to be used later in Sales Order.
A code listed in my prevoius post shows most of my method. I've got to indicate that my method works correctly and creates material. I've checked it through MM03 - I mean my material created with my method exists.
Moreover both sales org. and distr. channel are passed to BAPI, as you may see in the following code:
* SALESDATA
Structure salesData = input.getStructure("SALESDATA");
salesData.setValue("4000","SALES_ORG");
salesData.setValue("01","DISTR_CHAN");
salesData.setValue("NORM","ITEM_CAT");
salesData.setValue("4200","DELYG_PLNT");
But the problem occurs when I wanna create Sales Order (VA01) and when I choose the item. Material created by my method causes error:
"Material myMaterial is not defined for sales org. 4000, distr.chan. 01, language FI"
I don't understand why? I'm not SAP specialist, but in my opinion I've passed necessary data.
Do you any idea?
Thanks in advance. Every helpful suggestion will be properly rewarded.
BR,
Rafal -
To diplay write date format in an input field
I have written this code to get the curent date.
Date date=new Date(System.currentTimeMillis());
* //String dateString=date.toString();*
String dateString =date.getMonth()+"/";
String dateString1=date.getDay()+"/";
String dateString2=date.getYear()+"/";
wdComponentAPI.getMessageManager().reportSuccess("Date "+ date);
wdComponentAPI.getMessageManager().reportSuccess("DateSting:"+dateString);
wdComponentAPI.getMessageManager().reportSuccess("DateSting1:"+dateString1);
wdComponentAPI.getMessageManager().reportSuccess("DateSting2:"+dateString2);
I am getting this output:
date:2008-01-08
i want in mmddyyyy format
01-08-2008
plz help its giving default values
When we try to print separatelyAfter writning the following code:
Date date=new Date(System.currentTimeMillis());
Format formatter = new SimpleDateFormat("mm/dd/yyyy");
* String s = formatter.format(date)*
String dateString =date.getMonth()"/"date.getDay()"/"date.getYear();
wdComponentAPI.getMessageManager().reportSuccess("Date "+ date);
*wdComponentAPI.getMessageManager().reportSuccess("DateSting: "+dateString);
it is giving the foloowing o/p
0/2/1008
thats is its not converinting it properly plzz help urgent. -
Post Author: Jedit
CA Forum: General
I need a total sum for a shared number variable let me explain.
I have jobs (JWO-1,JWO-2 JWO-3 etcu2026..) that have items being scrapped at different operations.
I have a main report that shows all jobs with scrap & has two sections in it, detail section A & B.
My sub report is located in section A with the following fields
JOB | OP | QTY_SCRAP | COST.
The sub report lists all lines (operations) that have been completed for a job & filters on QTY_SCRAP being >0 then sums the cost filed for all completed operations up to the operation the item/s were scrapped.
I have a shared numbervar (linetotal) that Iu2019m using to pass the summed value back to my main report.
Syntax for variable is
whileprintingrecords;shared numbervar linetotal:=Sum ({table.Cost})
Back in my main report in detail section B.
I have some other fields that describes why the item/s were found to be faulty with a cost centre, the linetotal field from the sub report appears here & I reference it up with variable linetotal in my main report as
whileprintingrecords;shared numbervar linetotal
For any job, my report shows items being scraped at different operations with a cost & a reason for the scrap.
I now grouped on a Job Number & try to sum all the linetotal parameter fields.
Itu2019s at this point I have the difficulty?
I also want to use the values in a chart & have the same problem, the field is not available for a chart & canu2019t be summed????
I know itu2019s a bit verse & chapter but hopefully this will help?Dear Gary,
IMHO we can't use a structure type as a parameter ,
especially when the structure does not consist of string fields only.
This is the case why there is the need to define several select-options in the selection screen pointing to the same table ( ie : s_vbeln for vbak-vbeln, s_auart for vbak-auart ) .
In case of yours, if the parameter has a basic type, then the internal table definition should be just fine .
====
I have just read this thread again and find out that your requirement is to define a dynamic table .
In that case, you can ignore this reply
Rgds,
Tuwuh Sih Winedya
Message was edited by:
TUWUHSIH WINEDYA -
Date Format problem in a JTable, help plzzz !!!
Hi,
i have a JTable which contains multiple date columns, and more particulary, Timestamp columns.
I mean this format : yyyy-mm-dd hh:mm:ss.fffffffff
I only need hh:mm:ss informations for my JTable.
The problem is when i retrieve the datas in the JTable (which has a bean Select for model), the date column has this format : yyyy-mm-dd (only the date), and the time is not present !
What must i do to have only a part of the timestamp data in the column ??
Thanks in advance
SteveIf you want to format data in any way other than the default in a JTable, you need a table cell renderer. Sun's tutorial on how to use JTables explains them.
-
Date format ! Help me !
My XML data have date format like:
<INVOICE_DATE>20-JAN-06</INVOICE_DATE>
I want to change date format to: '20/01/2006'
In my rtf template, I tried some way in the user guide to do date format
I. Using the Microsoft Date Format Mask. To apply a date format to a form field:
1. Open the Form Field Options dialog box for the placeholder field.
2. Set the Type to Date
3. Select the appropriate Date format from the list of options "dd/MM/yyyy"
II. Using the Oracle Format Mask
<?format-date:INVOICE_DATE; ’dd/MM/yyyy’?>
III. Using the xdofx function
<?xdofx:to_date( INVOICE_DATE, ’dd/MM/yyyy')
But all the way i did date format is not work !
Anyone help me to change date format '20-JAN-06' to '20/01/2006' ?
Thanks !The Data should be canonical Data Format to format the date in RTF Template.
"YYYY-MM-DD";
"YYYY-MM-DD\"T\"HH24:MI:SS.FF3TZH:TZM";
"YYYY-MM-DD HH24:MI:SS";
Sample :
- <TEST>
<p_hiredate>1981-09-08 00:00:00.0</p_hiredate>
- <LIST_Q_query>
- <Q_query>
<EMPNO>7844</EMPNO>
<ENAME>TURNER</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>1981-09-08T00:00:00.000-07:00</HIREDATE>
<SAL>1500</SAL>
<COMM>0</COMM>
<DEPTNO>30</DEPTNO>
</Q_query>
</LIST_Q_query>
</TEST> -
Hello everyone,
I have installed Oracle11XE and noticed that it has the following date format:
SQL> SHOW PARAMETER NLS_DATE_FORMAT
NAME TYPE VALUE
nls_date_format string RR-MM-DD
I know that I can change the format for the session, like this:
alter session set nls_date_format = 'DD-MON-YY';
I also know that to change the system parameter I need to do the following:
alter system set nls_date_format = 'DD-MON-YY' scope=spfile;
then restart the database.
However, after I do the latter, the date format is still:
SQL> select sysdate from dual;
SYSDATE
14-11-19
Could someone tell me why this is happening and correct this?..
Thanks.goodluck247 wrote:
Hello everyone,
I have installed Oracle11XE and noticed that it has the following date format:
SQL> SHOW PARAMETER NLS_DATE_FORMAT
NAME TYPE VALUE
nls_date_format string RR-MM-DD
I know that I can change the format for the session, like this:
alter session set nls_date_format = 'DD-MON-YY';
I also know that to change the system parameter I need to do the following:
alter system set nls_date_format = 'DD-MON-YY' scope=spfile;
then restart the database.
However, after I do the latter, the date format is still:
SQL> select sysdate from dual;
SYSDATE
14-11-19
Could someone tell me why this is happening and correct this?..
Thanks.
NLS_DATE_FORMAT is set at
system
client OS
client oracle session.
system setting is weakest because it is over-ridden by any other setting.
See - But I want to store my date as ... -
Hi everyone,
when i set the date format mask in any field..
if i enter any wrong date format messages are coming in to loop
is this is bug of format mask?
how can i avoid this..
thanks in advance
anand mohanIt should not take you into a loop. If the "validation" against the format mask fails, a message is displayed, and the focus is returned to the field which caused the problem. Do you maybe have some method or event associated with the field which could be causing the circular behavior?
-- Brian -
Hi,
Where do we set the date format in ESS/MSS??Hi,
Please refer to this thread.
date format in ESS
Hope this helps.
Cheers,
Sandeep Tudumu -
How i can change date format in the query
I have made a query and Document date format is DD/MM/YYYY but i want Document date Format as YYYYMMDD. Please help me out as soon as posible.
Thanks is advance.Hi Harman,
By default query shows same date setting what is maitianed in SU01 (user maintenance). User can set the dates as they want. Ask user to log in BI system and go to system> User Profile> Own Data. They can select the date format and save the changes.
If you want to display same setting for all user, please select the format whenever you create any users and change for existing users.
Regards,
Kams -
Date format in planning application
Hi,
By default, the date format of a planning application is MM-DD-YY. In my application I change it to DD-MM-YY. But till now, when I am trying to enter a date in a data form of this application, also the date format is MM-DD-YY.
I want to change the date format. Can you please help me?
Thanks,
ArijitThanks KP for your reply but it didn't work.
I had logged into the workspace with the id with which the application was created. Then I changed the date format redeployed it and restarted the services yet in the form where I am trying to enter the date in the desired format its not allowing me to do so and the default date format is being displayed...
Can you please suggest where I am exactly going wrong? -
DATE FORMAT Conversion FOR SQL Reports
Hi,
Am building a report and am stuck here where this piece of code that throws the following error
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
My query goes some thing like this
DECLARE @StartDate varchar(15),
@EndDate Varchar(15)
SELECT @StartDate = '01/08/2014',
@EndDate = '31/08/2014'
SELECT DISTINCT
[Operation] = CASE WHEN p.DATE_OF_START BETWEEN @StartDate AND @EndDate THEN 'Add'
ELSE 'Update' END
FROM SNZ_HR_Reporting_POSMGNT as s
LEFT OUTER JOIN PERSON as p on s.EMP_NO = p.EMP_NO
WHERE s.CHANGE_DATE BETWEEN @StartDate AND @EndDate
The date format in the column DATE_OF_START is like yyyy-mm-dd 00.00.00.000 .
My question is how to convert this format to dd/mm/yyyy format and execute the queries
Many Thanks,
BhanuSQL Date Format:
http://www.sql-server-helper.com/tips/date-formats.aspx
Please Mark This As Answer if it helps to solve the issue -
Date Format Problem in Custom Report
Dear all ,
I am generating SQL statement for the report , i am passing (param_date from ) and (param_date to) to get data from SITs , and there is tow segments in the SITs : (SIT_date from ) and (SIT_date to) also ,, getting the data from the SITs by comparing the dates for the SIT and the parameters ,,, i am facing problem in the date format , ,, could any one please help me what is the format that i can compare the between dates in the SIT and the Parameters ???
Best Regards
Edited by: user6781803 on Jan 3, 2010 7:28 AM>
... i am facing problem in the date format ...
>
What is the problem ? Pl also post full versions of your OS and EBS.
HTH
Srini -
we are using jdeveloper 10.1.3.4 and rolled out an application to the oc4j server
in jdeveoper we specified the dat format in formatinfo.xml, in the oc4j server we get an error because the date format does not match:
....AND ( ( (Dinehmer.DI_GEBDAT = TO_DATE('01.01.2000', 'yyyy-mm-dd')) )
how to specify the language and date format parameters ?
thanks for help in advance
kr
dieterhello, i am aware of the to_date formats - the problem is, that is generated automatically bei adf!
Maybe you are looking for
-
Repair Purchase Order without Service Master
Good Day Guru's I need your help please. A little history.... I have recently took a position at a company as their SAP Admin and quit the consulting world. We go live first of December....While looking at some config, requirements, etc. one of the
-
Upgrade from 3.1.1 to 3.1.2
Hello, I have apex 3.1.1 installed and I would like to upgrade to 3.1.2. Unfortunately I don't have access to Metalink to get the patchset. The full installation available on OTN seems to not work with release 3.1.1 of apex. Does someone know if it i
-
Accounting software for macintosh?
Right now we use MYOB but it has become very slow. We called MYOB and they told use that we have out grown MYOB and that we need to use other software. Dose any one out there know of any Large Business Accounting software for macintosh? Or is it time
-
Include a page dimension in specific rows
In the former Hyperion Enterprise Reporting tool, it was possible to specify another dimension member by stating Sales of Product xxx without having the dimension in the row layout. I cant find anything similar in the manual for Hyperion Reports.
-
Freehand MX crashes when trying to open Freehand 10 files
Hello, I hope someone out there has some suggestions. I need to open some Freehand 10 documents in Freehand MX. When I try to open the FH10 files in Freehand MX it crashes. The icon it self looks like a blank page as if MX doesn't recognize it. I rei