Adding dateTime value in yyMMddHHmmss
Hi All,
I am using MSSQL Data Base. I have a requirement to store the date value in the form of yyMMddHHmmss. I am able to get the date value in the above format. But when I try to insert the value into the DB its throwing an Exception. The code to insert the value is as follows: -
String DATE_FORMAT = "yyMMddHHmmss";
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
Calendar c1 = Calendar.getInstance();
preparedStmt.setString(5,sdf.format(c1.getTime());
Albert-2Wiser wrote:
Hi All,
I am using MSSQL Data Base. I have a requirement to store the date value in the form of yyMMddHHmmss. I am able to get the date value in the above format. Which is meaningless unless you intend to store it in the database as a varchar data type.
But when I try to insert the value into the DB its throwing an Exception. The code to insert the value is as follows: - Which would suggest to me that the data type in the table is not in fact a varchar. Or some other error. Which the text of the message would tell you.
Similar Messages
-
After updating timezone.xml и RGNLSTNG.xml files for my SharePoint 2010 (SP2 - 14.0.7015.1000)
I have to run this command to Update time zone on calendar events:
stsadm -o tzmove -name "russ2014" -update all
But this cause an error: Adding a value to a 'datetime' column caused an overflow
ULS log event: System.Data.SqlClient.SqlException: Adding a value to a 'datetime' column caused an overflow. The statement has been terminated.
How to fix this?Hi,
Whether you added new time zone definition to your timezone.xml
and RGNLSTNG.xml files. if not, please provide the details about what content you updated in timezone.xml and RGNLSTNG.xml files.
The stsadm.exe –o tzmove command does not work for new time zone definition changes.
This command is designed for making changes in the existing time zone,
not for creating a new time zone definition.
After you modify the Timezone.xml and Regnlstng.xml files to include the new time zone definition, you must restart Internet Information Services (IIS).
To do this, click Start, click Run, type
iisreset in the Open box, and then click
OK.
Try to do IIS restart, compare the results.
Best Regards,
Lisa Chen
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected] -
No data found due to cost element adding leading values in report
Hi Experts,
I have an issue where when the run the analyser with some values in variable screen it is displaying the output correctly in analyser tool. I am filtering the cost element with a single value for ex 4545000 and I have kept that in rows . Still the report is working fine. But then when I go back to variable screen and change the input for ex instead of period 3 if I change it to 4 , output is null since the cost element is adding leading values to the existing value in the filter and displaying no result. for ex 4545000 is getting added with controlling area 0050 and its searching for 00500004545000 and since this is not the cost element value its not displaying output..
Any ideas how to rectify this or is it a analyser tool issue..
Thanks in advance
KishoreHi,
In my system it looks like this:
Note that superior infoobject to 0costcenter is 0co_area
Hope this helps,
Leszek -
Maintaining operating concern after adding new value field
Hello,
I added a new value field to our live operating concern,maintained the data structure throguh KEA0(Maintain operating concern).The changes are transported from Development to Quality,Changes were reflected in Q system.After testing in Q system transports were pushed to production system.The new value field is added to the operating concern. When i check the log for KEA0 in production system it displayed one message like:
Field VV088 was added to the reference structure
Message no. KE782.You probably either changed the operating concern or SAP-EIS aspect, and added the field VV099 to the definition.
The added a CO-PA value field:
In this case, the field is added to the definition or the summarization levels. This invalidates all existing levels. Consequently, you need to activate them again and fill them with data.
In production system maintaining operating concenr or KEAO is only in display mode.Is it needed to regenerate the operating concern once again in production, how to do it. Is the message talking about the KEDV summarization levels.?
thanks
rahulHi,
No no ....KEDV is nothing to do here....that is creation of summarization in CO-PA.
Since you added new value field you necessarily have to Regenerate the operating concern...
Use Tcode KEA0...go to Environment tab...there the status of Cross client part and client specific part both will be in RED....now just click on the Cross client (candle button)...now the system would regenerate the operating concern...once it is over do the same for the client specific...
Beware when you do regenerate the operating concern no body can enter any transaction in that server since it is cross client table ...hence better do it after business hours.
Hope this helps!
Running KEDU with rebuild is relevant only when you already have created summarization and called up the same in the CO-PA report "options" tab. If you did not created the summarization you are nothing to do with KEDU.
Next: The new value field has to be transported to PRD and hence even in PRD we have to do the regeneration manually.
Regards,
Velumani
Message was edited by: Velumani Arunachalam
Message was edited by: Velumani Arunachalam -
Impact of adding new value fields in ongoing operating concern.
Hi All,
Want to know the steps of adding new value fields in the existing operating concern in COPA?
What is the overall impact of addition of New Value fields in the running Operating Concern?
How do we test the addition of new value fields?
Is the addition of New Value fields to the running Operating Concern advisable?
Your support and advice is highly anticipated and appreciated.
Thanks & Regards
9819528669HI,
please search in SCN forum before you post:
Re: Adding a ValueField to an existing Operating Concern?
Best regards, Christian -
MinList function is not working in Date or datetime values in DRM
Hi,
We have a custom property End Date with data type as Date. We want to calculate the minimum end date across all the children of a particular node.
While using the below function it is giving blank value as output.
MinList(ReplaceStr(ListNodePropValues(ListChildren(SortOrder),[comma],Custom.NO_ALL_ALL_ENDDATE),[comma],#,true),#,date)
If we remove the MinList part and only evaluate ReplaceStr(ListNodePropValues(ListChildren(SortOrder),[comma],Custom.NO_ALL_ALL_ENDDATE),[comma],#,true), we are getting an output like 12/31/2019#12/31/2018.
Why DRM is not able to extract the min value? Does DRM not support this kind of use of this function?
We have even tried with a date time property, but the result is same.
If by using the above mentioned method it is not possible to get the min date value, what alternative approach can be taken for achieving this?
Any help on this is much appreciated.
Thanks
SudiptaI found this useful, check if it helps,
Using MinList and MaxList with Date Or DateTime Values In DRM (Doc ID 1967005.1)
Hyperion Data Relationship Management - Version 11.1.2.3.000 and later
Information in this document applies to any platform.
GOAL
Example: How can we calculate the minimum end date across all the children of a particular node?
You have a custom property End Date with data type as Date. You have tried using MinList in conjunction with ListNodePropValues thus:
MinList(ReplaceStr(ListNodePropValues(ListChildren(SortOrder),[comma],Custom.EndDate),[comma],#,true),#,date)
This gives a blank value as output.
SOLUTION
The most robust way of doing this using formulas is to format the date property as a string in ISO 8601 format. In yyyy-mm-dd format, alphabetic order is also date order. Add a helper String property like this:
FormattedDate(Custom.EndDate),yyyy-mm-ddThh:mm:ss) -- omit the time from the 'T' on if desired. Note that the format string is case sensitive.
Then the MinList function
MinList(ReplaceStr(ListNodePropValues(ListChildren(SortOrder),[comma],Custom.Helper),[comma],#,true),#,string)
will work.
Note that the functions MinList and MaxList return a blank value if the list contains any members that are not of the specified data type. Using ReplaceStr will implicitly convert the dates into strings, causing MinList and MaxList to fail if you specify DateTime. -
Datetime value does not match the specified format
Hi All,
I am writing this function for a template
case when "Employment Events (Current)"."Most Recent Hire Date" is NULL then NULL else CAST(TIMESTAMPDIFF(SQL_TSI_YEAR,cast(cast("Employment Events (Current)"."Most Recent Hire Date" as char)as timestamp),Cast(Cast(@{EndDate}{CAST('2011-01-01' AS DATE)} AS CHAR) AS TIMESTAMP)) AS CHAR)||' year(s) ' end
but when it runs, it throws me this error
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 46046] Datetime value 2011-01-01 does not match the specified format. (HY000)
What am I doing wrong? "Employment Events (Current)"."Most Recent Hire Date" is set to max - aggregation in the rpd.I found the solution as well.
The ODBC driver on the Windows server was old (Version 6). I upgraded that to SQL Server Native Client 11.0 and everything works fine. -
Can't display MS SQL datetime value in SQL Developer 1.5.1
Hi All,
I try to select the datetime value from MS SQL Server and the SQL Developer display strange value like this:
oracle.sql.TIMESTAMP@f37160
The problem does not exists in the previous version. And any body can help to solve it?
Thanks.ISSUE CLARIFICATION
====================
Attempting to view records in a table from a MS SQL Server 2005 schema. All fields are ok, except
the datetime fields.
Getting Oracle.sql.date@E4F4012
This worked (actually still works) with SQL Developer 1.2.1. In fact, I see both on my screen and
1.2.1 views the fields fine, 1.5.4 does not.
ISSUE VERIFICATION
===================
Verified the issue by the screen shots
DATA COLLECTED
===============
SCREEN SHOTS
SR6930954.994_SQLDeveloper.ppt
CAUSE DETERMINATION
====================
Missing option in SQL Server 2005 default datatype mapping rules.
CAUSE JUSTIFICATION
====================
Note 458294.1
Bug 6360558 / Bug 6378114
PROPOSED SOLUTION(S)
======================
use the workaround provided in Note: 458294.1
PROPOSED SOLUTION JUSTIFICATION(S)
====================================
Note 458294.1
Bug 6360558 / Bug 6378114
SOLUTION / ACTION PLAN
=======================
You can use the following workaround if you want SQL Server 2005 DATETIME datatype map to Oracle DATE:
- On the Captured Model, select 'Set Data Mapping'
- Click on Apply in the 'Set Data Map' Window, this will create a record in the Repository
- Open a connection with the Repository database
- Click on Tables
- Click on table MIGR_DATATYPE_TRANSFORM_RULE
- Click on the "Data" Tab
- Sort on column "SOURCE_DATA_TYPE_NAME"
- Look for "DATETIME"
- Change the value of column "TARGET_DATA_TYPE_NAME" from TIMESTAMP to DATE
- Change the value of column "TARGET_SCALE" from 6 to (null)
- Commit the change.
Remark: This workaround is only suitable if the repository contains only 1 captured model, otherwise we need to identify the proper MAP_ID.
KNOWLEDGE CONTENT
=================
Platform / Port Specific? = NO
Knowledge content not created because the following note already addresses this issue: Note.458294.1
This problem has been identified as a bug. And it has been fixed in Version 2.0.0 (Future Release)
For available workaround refer to the above tags and NOTE: 458294.1
Regards,
Srikanth
Oracle Support Services.
Currently Support is not having any information of the release date for sql developer V2.0.0
Regards,
Srikanth -
Hi,
I am trying to adding domain values to DVM at run time,
it is getting added to DVM at that movement ,bt
when i redeploy the service I am not able to see the changes.
so help required regarding thisHello
That is the solution to his problem, by the sounds of it when he redploys his code he gets the old values (the one in his code) if he migrates it to the MDS when he redeploys it won't change. This will seperate his deployment from run time configuration values which is a good idea.
Best Regards Tristan -
"Data truncation: Incorrect datetime value" Error Message
Hello,
I'm running Coldfusion 8 with a MySQL database. The s10Date
column is of type "datetime".
What would cause the following error to occur when I'm
entering data into the database?
Data truncation: Incorrect datetime value: '{ts '2008-09-03
17:16:01'}' for column 's10Date' at row 1
The error occurred in
C:\ColdFusion8\wwwroot\Websites\questnbs.info\components\DataMgr\DataMgr.cfc:
line 1602
Called from
C:\ColdFusion8\wwwroot\Websites\questnbs.info\components\DataMgr\DataMgr.cfc:
line 1170
Called from
C:\ColdFusion8\wwwroot\Websites\questnbs.info\components\DataMgr\DataMgr.cfc:
line 1633
Called from
C:\ColdFusion8\wwwroot\Websites\questnbs.info\parsed\quest_c_registrations.processregistr ationform.cfm:
line 37
Called from
C:\ColdFusion8\wwwroot\Websites\questnbs.info\parsed\quest_c_registrations.processregistr ationform.cfm:
line 5
Called from
C:\ColdFusion8\wwwroot\Websites\questnbs.info\parsed\quest_c_registrations.processregistr ationform.cfm:
line 1
Called from
C:\ColdFusion8\wwwroot\Websites\questnbs.info\fusebox5\Application.cfc:
line 228
Called from
C:\ColdFusion8\wwwroot\Websites\questnbs.info\fusebox5\Application.cfc:
line 218
Called from
C:\ColdFusion8\wwwroot\Websites\questnbs.info\fusebox5\fusebox5.cfm:
line 57
Called from
C:\ColdFusion8\wwwroot\Websites\questnbs.info\index.cfm: line 12
1600 : <cfquery name="qQuery"
datasource="#variables.datasource#" username="#variables.username#"
password="#variables.password#"><cfloop index="i" from="1"
to="#ArrayLen(aSQL)#" step="1"><cfif IsSimpleValue(aSQL
)><cfset temp =
aSQL>#Trim(PreserveSingleQuotes(temp))#<cfelseif
IsStruct(aSQL
)><cfset aSQL = queryparam(argumentCollection=aSQL
)><cfswitch
expression="#aSQL.cfsqltype#"><cfcase
value="CF_SQL_BIT"><cfif aSQL
.value>1<cfelse>0</cfif></cfcase><cfcase
value="CF_SQL_DATE">#CreateODBCDateTime(aSQL.value)#</cfcase><cfdefaultcase><cfif
ListFindNoCase(variables.dectypes,aSQL
.cfsqltype)>#Val(aSQL.value)#<cfelse><cfqueryparam
value="#aSQL
.value#" cfsqltype="#aSQL.cfsqltype#" maxlength="#aSQL
.maxlength#" scale="#aSQL.scale#" null="#aSQL
.null#" list="#aSQL.list#" separator="#aSQL
.separator#"></cfif></cfdefaultcase></cfswitch></cfif>
</cfloop></cfquery>
1601 : <cfelse>
1602 : <cfquery name="qQuery"
datasource="#variables.datasource#"><cfloop index="i"
from="1" to="#ArrayLen(aSQL)#" step="1"><cfif
IsSimpleValue(aSQL)><cfset temp = aSQL
>#Trim(PreserveSingleQuotes(temp))#<cfelseif
IsStruct(aSQL)><cfset aSQL
= queryparam(argumentCollection=aSQL)><cfswitch
expression="#aSQL
.cfsqltype#"><cfcase value="CF_SQL_BIT"><cfif
aSQL.value>1<cfelse>0</cfif></cfcase><cfcase
value="CF_SQL_DATE">#CreateODBCDateTime(aSQL
.value)#</cfcase><cfdefaultcase><cfif
ListFindNoCase(variables.dectypes,aSQL.cfsqltype)>#Val(aSQL
.value)#<cfelse><cfqueryparam value="#aSQL.value#"
cfsqltype="#aSQL
.cfsqltype#" maxlength="#aSQL.maxlength#" scale="#aSQL
.scale#" null="#aSQL.null#" list="#aSQL
.list#"
separator="#aSQL.separator#"></cfif></cfdefaultcase></cfswitch></cfif>
</cfloop></cfquery>
1603 : </cfif>
1604 :
Thank you in advance for your assistance.
SimonJust a note, I had the same problem and resolved it by making
sure my cfsqltype in cfqueryparam is cf_sql_timestamp instead of
cf_sql_datetime (which is not a valid value).
Also, just a note that when working with a datetime value in
cfqueryparam, using cf_sql_date for cfsqltype will truncate the
time to 00:00:00. -
Hi,
I am getting the following error while selecting the date column from Report. Please suggest the solution or work around.
SET VARIABLE QUERY_SRC_CD='Report';SELECT
0 s_0,
"PPMC SA"."Dim Workplan"."Project Id" s_1,
"PPMC SA"."Dim Workplan"."Project Name" s_2,
"PPMC SA"."Dim Workplan"."Task Actual Start Date" s_3
FROM "PPMC SA"
ORDER BY 1, 2 ASC NULLS LAST, 3 ASC NULLS LAST, 4 ASC NULLS LAST
FETCH FIRST 65001 ROWS ONLY
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS.
[nQSError: 46046] Datetime value -09-05 does not match the specified format. (HY000)
My Observations: Task Actual Start Date is a date column in SQL Server 2008, the column imported in obiee Physcial layer as Varchar(10). So i converted the column as Date in Physical layer.
Thanks in Advance,
PradeepHi Pradeep,
One or more rows in 'Task Actual Start Date' does not have date time format which is why you will be getting this error. You may have to fix this at data level to get rid off this error.
To test, apply a filter to see 5-10 rows of data, it should work fine as you would have excluded that data.
Pls mark if correct/helpful. -
Jsp string of a datetime value error
Hi all, I got this problem in one jsp recently, sql0181N String representation of a datetime value is out of range. However, this error just occur in recently, there is no such error before and the page can successfully loaded with proper function. And I didn't change the code of the related page so far, why leads to such problem. The page is just for displaying several years data, show the data week by week, that's why need the string of datetime value. And the page can successfully show all data for several months, so I would like to know why it suddenly has such error? Anyone can offer me a helping hand? Really thanks a lot.
This is caused by an invalid date, which you may know, perhaps you changed the date format somewhere? or the locale on the page?
so instead of 12/31/2008 being new years eve you might be trying 31/12/2008 which is invalid?
just a thought. -
GetFieldValue() to read a DateTime value
How can I use the function GetFieldValue() to read a DateTime value in a table field and then convert it to a string ?
MarioIf You have access to query texts
write "to_char(someday, 'dd/mm/rrrr')" instead of writing "someday"
If You don't - contact Your DBA or database developer to rewrite sqls
then use
oresult GetFieldValue(int index, char *buffer, unsigned short maxlen) const -
Adding key values continuously
Hi,
I want to add some key-values in a hashtable continuously i.e for example
Hashtable cv = new Hashtable();
cv.put(key1,value1); //added key-value
The next time I execute the above code, the previous value will not be there, but only the current value. I want both the previous value and next value.
i.e. cv should contain [key1=value1, key2=value2]
How to achieve this?
Please help me in this regard.
Thanks in Advance....Hi,
What happens here is
class Dymmy {
private Hashtable cv = new Hashtable();
public void addValue(Object key, Object value) {
List values = (List)cv.get(key);
if (values == null) {
values = new LinkedList();
values.add(value);
cv.put.(key, values);
When I invoke the class first time cv contains [key1=value1]
When I invoke the class second time cv again contains [key1=value1] instead it should contain [key1=value1,key2=value2]
If I invoke it third time cv should contain [key1=value1,key2=value2,key3,value3] ... -
How to set Default DateTime values in Crystal Reports 2008
Hi All,
I'm using Crystal Reports 2008. I have two fields FromDate and ToDate in reports. While running report, FromDate field should be displayed with CurrentDate + 00:00:00 in the UI and for ToDate it should be displayed with CurrentDate + 23:59:59 format.
I have tried the below things, But still I want to set CurrentDate + 00:00:00 time in DateTime field.
"In CR 2008 you would set the time portion to 00:00:00 in this way:
1) Edit the date/time parameter and look for the 'Default Value' option; it would be blank
2) Set this to 00:00:00
This would default the calendar to 12/30/1899 00:00:00. The only worry here is, when you click on the calendar icon you would be presented with the calendar for the year 1899 and it is painstaking to scroll all the way to the current year."
I found one solution in SAP forum and I have added the below lines in Record Selection formula,
{@FromDate} = date(@CurrentDate)+time(00,00,00)
{@ToDate} = date(@CurrentDate)+time(23,59,59)
When I run the report, I still getting the empty values in the input parameters screen.
Am I missing anything? Kindly help
Thanks,
Ramesh Kumar G.See the following for samples:
Java (Crystal Reports for Eclipse) SDK - Business Intelligence (BusinessObjects) - SCN Wiki
BusinessObjects Enterprise / SAP BusinessObjects Business Intelligence Platform 4.x Java SDK Applications
Business Objects / BI Unmanaged Java RAS SDK Sample Applications
Developer Help Files:
Crystal Reports SDK
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
Maybe you are looking for
-
Configuring file realm in weblogic server 9.2
Hi, I am trying to upgrade my application from weblogic 6.1 to weblogic 9.2 and I am using compatibility security. I have configured a RDBMS realm and then configured the caching realm giving that RDBMS realm as its Base realm. Now since caching real
-
Custom Employee Number Generation Using Fast Formulas
Hi, I have a requirement to generate custom employee numbers like "EMP100001". we have already created a business group with the setting of Employee number generation as Automatic. but we need to generate custom employee number as Format given above
-
I was forced to download the lastest version, purchased music, and when I try to burn to disc I receive the following message " Disc recording not found" Please help very frustrated
-
I'm experiencing extreme lag while using photoshop lately. I'm running CS5 on a Mac OS X 10.5.8. My computer is about three years old but the hard drive was replaced about 6 months ago. Basically what happens is that the program runs incredibly slow
-
Upgraded...oh my
i upgraded my macbook, quicktime is now not working...all i get is the question mark icon, i use flip4mac to view windows media player videos....but that has also stopped working. any help would be awesome...also new mac user so hopefully i can under