Problem in date insertion

hi..
i have a jsp page, which is used to insert values in database...
my problem is that i can insert date values only in dd-MM-YY format.i.e 26-jan-04 only...
if i enter any valid date format, it cannot able to insert it in database..i.e 26/01/2004 ...
i want to do only one thing that i can enter date in any format, it can insert it in database and it display the date values in dd-MM-yy format.
My code is as follow:
<html>
<body>
<table>
<tr>
<td>
<%@ page import =" java.sql.Date.*" %>
<%@ page import =" java.text.SimpleDateFormat.*" %>
<%@ page import =" java.util.Date.*" %>
<%@ page import =" java.text.*" %>
<%@ page import="javax.servlet.*" %>
<%@ page import="javax.servlet.http.*" %>
<%@ page language="java" import="java.sql.*" %>
<%
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:pf","scott","ttlscott");
System.out.println("got connection");
%>
<%
String action = request.getParameter("action");
if (action != null && action.equals("save")) {
conn.setAutoCommit(false);
SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM-yy");
sdf.setLenient(false);
PreparedStatement pstmt = conn.prepareStatement(
("INSERT INTO pay_header VALUES (?, ?, ?, ?, ?, ?,?,?)"));
pstmt.setString(1,request.getParameter("vou_no"));
pstmt.setString(2,request.getParameter("pay_date"));
pstmt.setString(3,request.getParameter("pay_post"));
pstmt.setString(4,request.getParameter("pay_narr"));
pstmt.setString(5, request.getParameter("chq_no"));
pstmt.setString(6,request.getParameter("chq_date"));
pstmt.setFloat(7,Float.parseFloat(request.getParameter("chq_amt")));
pstmt.setString(8,request.getParameter("pay_type"));
pstmt.executeUpdate();
conn.commit();
conn.setAutoCommit(true);
%>
<%
Statement statement = conn.createStatement();
ResultSet rs = statement.executeQuery
("SELECT * FROM pay_header ");
%>
<table>
<tr>
<th>Code</th>
<th>Description</th>
<th>Dr. Amt</th>
<th>Cr. Amt</th>
<th>Type</th>
<th>Pct</th>
<th>Pct</th>
</tr>
<tr>
<form action="payment_save1.jsp" method="get">
<input type="hidden" value="save" name="action">
<th><input value="<%= request.getParameter("voucherno") %>" name="vou_no" size="10"></th>
<th><input value="<%= request.getParameter("date") %>" name="pay_date" size="10"></th>
<th><input value="<%= request.getParameter("hold") %>" name="pay_post" size="15"></th>
<th><input value="<%= request.getParameter("narration") %>" name="pay_narr" size="15"></th>
<th><input value="<%= request.getParameter("chqno") %>" name="chq_no" size="15"></th>
<th><input value="<%= request.getParameter("chqdate") %>" name="chq_date" size="15"></th>
<th><input value="<%= request.getParameter("chqamt") %>" name="chq_amt" size="15"></th>
<th><input value="<%= request.getParameter("post") %>" name="pay_type" size="15"></th>
<th><input type="submit" value="save"></th>
</form>
</tr>
<%
while ( rs.next() ) {
%>
<tr>
<form action="payment_save1.jsp" method="get">
<input type="hidden" value="save" name="action">
<td><input value="<%= rs.getString("vou_no") %>" name="vou_no"></td>
<td><input value="<%= rs.getDate("pay_date") %>" name="pay_date"></td>
<td><input value="<%= rs.getString("pay_post") %>" name="pay_post"></td>
<td><input value="<%= rs.getString("pay_narr") %>" name="pay_narr"></td>
<td><input value="<%= rs.getString("chq_no") %>" name="chq_no"></td>
<td><input value="<%= rs.getDate("chq_date") %>" name="chq_date"></td>
<td><input value="<%= rs.getFloat("chq_amt") %>" name="chq_amt"></td>
<td><input value="<%= rs.getString("pay_type") %>" name="pay_type"></td>
<td><input type="submit" value="save"></td>
</form>
</tr>
<%
%>
</table>
<%
// Close the ResultSet
rs.close();
// Close the Statement
statement.close();
// Close the Connection
conn.close();
} catch (SQLException sqle) {
out.println(sqle.getMessage());
} catch (Exception e) {
out.println(e.getMessage());
%>
</td>
</tr>
</body>
</html>

Hi,
Still asking about the dates? Haven't you received enough answers?
How will you be able to write a program that takes a date in any format?
In Sweden we write dates as, yy-MM-dd, but in some other countries the write the dates in another order. How will you be able to tell which date 02-10-07 is??
/Kaj

Similar Messages

  • Spatial data insert problem

    Hello,
    i want to make an spatial data insert, but it doesn't work well. Help would be fine.
    create table SCHIFFSPOSITION(
    SCHIFF_ID                    NUMBER NOT NULL,
    SCHIFF_NAME                VARCHAR(25),
    SYS_POS_SN               VARCHAR(25),
    SYS_LAT_P4_DER               VARCHAR(15),
    SYS_LON_P4_DER               VARCHAR(15),
    GEOM                          SDO_GEOMETRY,
    constraint PK_SCHIFFSPOSITION primary key(SCHIFF_ID));
    insert into MDSYS.USER_SDO_GEOM_METADATA values ('SCHIFFSPOSITION', 'GEOM',
    SDO_DIM_ARRAY (
    SDO_DIM_ELEMENT ('Longitude', -180, 180, .0005),
    SDO_DIM_ELEMENT ('Latitude', -90, 90, .0005)),8307);
    create index SCHIFFSPOS_IDX on SCHIFFSPOSITION(GEOM) indextype is MDSYS.SPATIAL_INDEX parameters('sdo_indx_dims=2, layer_gtype=point');
    INSERT INTO SCHIFFSPOSITION(SCHIFF_ID, SCHIFF_NAME, SYS_POS_SN, SYS_LAT_P4_DER, SYS_LON_P4_DER,
    MDSYS.SDO_GEOMETRY(2001,8307, MDSYS.SDO_POINT_TYPE(SYS_LON_GRAD_DER,SYS_LAT_GRAD_DER,null),null,null)))
    VALUES (1, 'METEOR 63', 'GPS', '33° 54,4246 S', '18° 25,9184 E', '18.4319736', '-33.9070772');
    thank you very much

    Hi,
    please insert that way:
    INSERT INTO SCHIFFSPOSITION(SCHIFF_ID, SCHIFF_NAME, SYS_POS_SN, SYS_LAT_P4_DER, SYS_LON_P4_DER,GEOM)
    VALUES (1, 'METEOR 63', 'GPS', '33° 54,4246 S', '18° 25,9184 E', MDSYS.SDO_GEOMETRY(
      2001
      ,8307
      , MDSYS.SDO_POINT_TYPE(
        18.4319736
        ,-33.9070772
        ,null
      ,null
      ,null
    )

  • Problem while  data processing TRANSACTION data from DSO to CUBE

    Hi Guru's,
    we are facing problem while  data processing TRANSACTION data from DSO to CUBE. data packets  processing very slowly  and updating .Please help me regarding this.
    Thanks and regards,
    Sridhar

    Hi,
    I will suggest you to check a few places where you can see the status
    1) SM37 job log (give BIrequest name) and it should give you the details about the request. If its active make sure that the job log is getting updated at frequent intervals.
    2) SM66 get the job details (server name PID etc from SM37) and see in SM66 if the job is running or not. See if its accessing/updating some tables or is not doing anything at all.
    If its running and if you are able to see it active in SM66 you can wait for some time to let it finish.
    3) RSMO see what is available in details tab. It may be in update rules.
    4) ST22 check if any short dump has occured.
    You can also try SM50 / SM51 to see what is happening in the system level like reading/inserting tables etc.
    If you feel its active and running you can verify by checking if the number of records has increased in the cube.
    Thanks,
    JituK

  • Problem with SQL Insert

    Hi
    I am using Flex to insert data through remoteobject and using
    SAVE method generated from CFC Wizard.
    My VO contains the following variables where id has a default
    value of 0 :
    public var id:Number = 0 ;
    public var date:String = "";
    public var accountno:String = "";
    public var debit:Number = 0;
    public var credit:Number = 0;
    id is set as the primary key in my database.
    I have previously used MySQL which automatically generates a
    new id if I either omitted the id value in my insert statement or
    use 0 as the default value.
    However, now I am using MS SQL Server and the insert
    generated this error:
    Unable to invoke CFC - Error Executing Database Query.
    Detail:
    [Macromedia][SQLServer JDBC Driver][SQLServer]Cannot insert
    explicit value for identity column in table 'Transactions' when
    IDENTITY_INSERT is set to OFF.
    Strange thing is that I dont see this problem with another
    sample application. I compared with that application (it has the
    same VO with default value of 0 for id) and everything looks
    similar so I can't understand why I have this error in my
    application.
    This is SQL used to create the table:
    USE [Transactions]
    SET ANSI_NULLS ON
    SET QUOTED_IDENTIFIER ON
    SET ANSI_PADDING ON
    CREATE TABLE [dbo].[Transactions](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [date] [datetime] NULL,
    [accountno] [varchar](100) NULL,
    [debit] [int] NULL,
    [credit] [int] NULL,
    CONSTRAINT [PK_Transactions] PRIMARY KEY CLUSTERED
    [id] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE =
    OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,
    ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    Has anyone encountered this problem before with insert
    statements dealing with a unique id (with MS SQL Server)?

    Change "addRecords =
    connection.prepareStatement("
    to "addRecords =
    connection.preparedStatement("
    -BIGD

  • Problem with date conversion

    I have read some topics about it, but still have problem :-(((
    When I insert data, I don't have any problem with a date. It looks like this:
         Statement stmt = con.createStatement();
              stmt.executeUpdate("BEGIN " +
                        "INSERT INTO employee VALUES (" +
                        "employee_t(idnum.nextval,'John','Double'," +
                        "to_date('21.01.1975','DD.MM.YYYY'), 20000))" +
                        "END;"); Now I am trying to update, and get the error:
      String query = "BEGIN UPDATE employee SET " +
    "first_name ='"+getJtxtfldFirst_name().getText()+"', "+
    "last_name = '"+getJtxtfldLast_name().getText()+"', "+
    "date_of_birth = to_date('1982-03-11','YYYY-MM-DD'), "+
                                     "END; ";
    Statement stmt = con.createStatement();
                   int rs = stmt.executeUpdate(query);
                   stmt.close();The error:
    java.sql.SQLException: ORA-06550: line 1, column 149:
    PLS-00338: unable to resolve "DATE_OF_BIRTH" as a column or row expression
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignoredI have tried different variants, tried to parse... Just can't find where I make the error.
    If I comment this line, with a date, there are no any exceptions.
    This code in sqlplus works fine.

    And besides that, you don't need to wrap your SQL
    with the PL/SQL "BEGIN" and "END" tags; why invoke
    the PL/SQL parser if you're not using any PL/SQL
    features?
    I suspect your underlying problem is that the column
    isn't actually named "date_of_birth".You are quete right. It was my faulf. There was a field date_of_birthday. The oracle could say it more preciesly.
    With the statement it works fine also.
    Thank you for the answer and sorry for disturbing, I have forgotten to update the database and was sure I copied the new files... But updated the old one.

  • Problem in Date

    Hello,
    I have table with one date coloumn having rows 2000 rows.
    Out of 2000 rows, arround 1550 rows are having data 09/04/2002.
    other rows are having 05/04/2002.
    Problem is : If I run a following i gets 0 rows selected.
    SELECT COUNT(*) FROM TABLENAME WHERE TXNDT='09/04/2002'.
    If I run the same with following query then I gets the result.
    SELECT COUNT(*) FROM TABLENAME WHERE TXNDT>='09/04/2002'.
    I got result as 1550 rows selected.
    Please help me in the matter. If I give = sign then no output is
    generating even though there is records and i gets the output if
    i give >= sign.
    If this is the problem I might be facing lots of problem in date
    matching coding, which i have used in many applications.
    I have migrated my database from 7.3 to 8i recently. if this is the
    problem please reply...
    Thanks
    Ramesh Ganji

    Hi,
      Bear in mind that the date in your table includes time.
      (maybe you insert the record using SYSDATE).
      Your where-clause's '09/04/2002' does not include time.
      Note that '09/04/2002 00:00:01' is greater than '09/04/2002'!
      So there are 2 ways to go.
      1. Truncate the time in date column of your table.
         UPDATE your_table SET date_col = TRUNC(date_col);
      OR
      2. If you want to retrieve record in specific date, e.g. 09/04/2002,
         use the following SQL format:
         SELECT *
         FROM   your_table
         WHERE  date_col BETWEEN TO_DATE('20020409', 'YYYYMMDD') AND
                                 TO_DATE('20020409235959', 'YYYYMMDDHH24MISS');
    Hope help you   

  • Problem finding data in an Oracle Database using CMP beans

    I am having a problem retrieving data from an Oracle database that has a date as
    part of the key. This data was loaded into my database via a batch process writing
    in java using java.sql.Date to store the date information. When calling the findByPrimaryKey
    method of a CMP Entity Bean I continued to get the FinderException. I know this
    data is in my database because I can view the data via SQLPlus and Microsoft Access.
    Has anyone ever experience problems with CMP beans accessing data from an Oracle
    database that had a date as part if the key or with accessing data in the database
    that insert via another method outside of your CMP bean. I desperately need some
    answers.

    Hi Dave,
    You should probably post this type of question in the CMP or JDBC section
    for best results. Chances are that the date is suffering from a rounding
    problem (it could be a date/time in the database with a different time zone)
    or is not the date that you think it is (wrong century or millenium). I've
    seen both. You need to write a quick piece of code that loads in those
    values as both Java timestamps and dates and makes sure that they are what
    you think they are.
    Peace,
    Cameron Purdy
    Tangosol Inc.
    Tangosol Coherence: Clustered Coherent Cache for J2EE
    Information at http://www.tangosol.com/
    "Dave White" <[email protected]> wrote in message
    news:3c1a4ac3$[email protected]..
    >
    I am having a problem retrieving data from an Oracle database that has adate as
    part of the key. This data was loaded into my database via a batchprocess writing
    in java using java.sql.Date to store the date information. When callingthe findByPrimaryKey
    method of a CMP Entity Bean I continued to get the FinderException. Iknow this
    data is in my database because I can view the data via SQLPlus andMicrosoft Access.
    Has anyone ever experience problems with CMP beans accessing data from anOracle
    database that had a date as part if the key or with accessing data in thedatabase
    that insert via another method outside of your CMP bean. I desperatelyneed some
    answers.

  • Exception has occurred during data insertion ... Wrong number of parameters

    I am using an ADO dataflow source and an ADO dataflow destination to move data from a table on an IBM iSeries DB2 database to another IBM iSeries DB2 database on another machine.  The connection managers for source and destination both use .Net Providers\Odbc
    Data Provider with the Data Source Specification being ODBC connections specified on the Windows Server 2008 r2 machine hosting bids.  All the test connections work...so far so good.
    Issue is when I execute the control flow task the rows get picked up from the source DB2 database no problem but it fails on the insert to the destination DB2 table...The progress tab specifies the exceptions...
    [ADO NET Destination [601]] Error: An exception has occurred during data insertion, the message returned from the provider is: ERROR [07002] [IBM][System i Access ODBC Driver]Wrong number of parameters.
    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "ADO NET Destination" (601) failed with error code 0xC020844B while processing input "ADO NET Destination Input" (604). The identified
    component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the
    failure.
    I put a data viewer on the data flow connection and the records I expect are  getting picked up and look ok. I checked to make sure the source and destination tables have the same number of columns in their record layout and identical data
    types and they look fine.
    Could someone kindly tell me whats going wrong?  Does the error message indicate that some of the columns are getting dropped from the dataset before the insert?
    Thanks much in advance for any help, Roscoe

    Hi Roscoe,
    Glad to hear that you have found the root cause. So, the issue occurs because numeric values with no decimal cannot be inserted into the Decimal data type column in the DB2 table. In SSIS, data type Decimal of DB2 database is mapped to data type DT_NUMERIC.
    To address the issue, you can do a data conversion for the column in question to define its precision and scale such as DT_NUMERIC(9,2) by using the Data Conversion Transformation before the ADO NET Destination.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • CHUNK DATA INSERT

    Hello All!
    I'm inserting a table with millions of records, from another table.  I'm also parsing out some XML data.  My problem is this insert takes hours to do, when I leave for home at night, my session times out, and everything roll back to 0 rows inserted.
     I want to commit to 10000 at a time, so when it does time out, I can pick up where I left off.  I tried something below, but it doesn't save the records after I lose a connection.  Any Thoughts?
    Thanks  Rudy
    DECLARE @i INT = 1
    WHILE @i <= 10000 BEGIN
    IF @i % 10000 = 1
    BEGIN TRANSACTION;
    INSERT INTO CourtRecordEvent
    (CaseNumber, CountyNumber, HistorySequenceNumber, EventType, EventDate, Tag, Timezone, [Description],
    ctofcFirstName, ctofcLastName, ctofcMiddleName, ctofcSuffix, sealCtofcFirstName, sealCtofcLastName, sealCtofcMiddleName,
    sealCtofcSuffix, courtRptrFirstName, courtRptrLastName, courtRptrMiddleName, courtRptrSuffix, DktText, IsMoneyEnabled, EventAmt, sealCtofcTypeCodeDescr)
    SELECT
    COALESCE (pref.value('(caseNo/text())[1]', 'varchar(20)'),'0') as CaseNumber,
    COALESCE (pref.value('(countyNo/text())[1]', 'int'),'0') as CountyNumber,
    COALESCE (pref.value('(histSeqNo/text())[1]', 'int'),'0') as HistorySequenceNumber,
    COALESCE (pref.value('(eventType/text())[1]', 'varchar(20)'),'0') as EventType,
    COALESCE (pref.value('(eventDate/text())[1]', 'datetime'),'0') as EventDate,
    COALESCE (pref.value('(tag/text())[1]', 'varchar(50)'),'0') as Tag,
    pref.value('(eventDate_TZ/text())[1]', 'varchar(20)') as Timezone,
    pref.value('(descr/text())[1]', 'nvarchar(max)') as [Description],
    pref.value('(ctofcNameF/text())[1]', 'nvarchar(150)') as ctofcFirstName,
    pref.value('(ctofcNameL/text())[1]', 'nvarchar(150)') as ctofcLastName,
    pref.value('(ctofcNameM/text())[1]', 'nvarchar(150)') as ctofcMiddleName,
    pref.value('(ctofcSuffix/text())[1]', 'nvarchar(20)') as ctofcSuffix,
    pref.value('(sealCtofcNameF/text())[1]', 'nvarchar(150)') as sealCtofcFirstName,
    pref.value('(sealCtofcNameL/text())[1]', 'nvarchar(150)') as sealCtofcLastName,
    pref.value('(sealCtofcNameM/text())[1]', 'nvarchar(150)') as sealCtofcMiddleName,
    pref.value('(sealCtofcSuffix/text())[1]', 'nvarchar(20)') as sealCtofcSuffix,
    pref.value('(courtRptrNameF/text())[1]', 'nvarchar(150)') as courtRptrFirstName,
    pref.value('(courtRptrNameL/text())[1]', 'nvarchar(150)') as courtRptrLastName,
    pref.value('(courtRptrNameM/text())[1]', 'nchar(10)') as courtRptrMiddleName,
    pref.value('(courtRptrSuffix/text())[1]', 'int') as courtRptrSuffix,
    pref.value('(dktTxt/text())[1]', 'nvarchar(max)') as DktText,
    pref.value('(isMoneyEnabled/text())[1]', 'bit') as IsMoneyEnabled,
    pref.value('(eventAmt/text())[1]', 'money') as EventAmt,
    pref.value('(sealCtofcTypeCodeDescr/text())[1]', 'nvarchar(50)') as sealCtofcTypeCodeDescr
    FROM
    dbo.CaseHistoryRawData_XML CROSS APPLY
    RawData.nodes('//CourtRecordEventCaseHist') AS CourtRec(pref)
    IF @i % 10000 = 0
    COMMIT;
    END
    GO

    Your loop will do 10000 the same big insert of 429 millions of rows.
    You need to change you select to insert smaller number of rows each time, e.g. using TOP from unprocessed data or some expression based on "i".
    You should do 10000 rows of data in each loop and the loop condition should check, if all data are processed. That way, even if session timeouts, you will be able to restart previous job.

  • TIPS(53) : DECODE를 이용한 DATE INSERT 시에 잘못된 값이 들어가는 경우.

    제품 : ORACLE SERVER
    작성날짜 : 2002-11-06
    TIPS(53) : DECODE를 이용한 DATE INSERT 시에 잘못된 값이 들어가는 경우
    =====================================================================
    Purpose
    decode를 사용하는 date data type의 처리에서는 가끔 예기치 않은
    오류가 발생된다. 예를 들면 2000년을 insert를 하였는데 실제 값은
    1900년이 들어가게 되는 문제이다. 이것은 사용자를 매우 당황하게
    만드는데 이런 경우에 대해 확인하고 조치하는 방법을 살펴보자.
    Problem Description
    1. nls_date_format을 'yy-mon-dd'로 하였을 경우
    SQL> ALTER SESSION SET NLS_DATE_FORMAT='YY-MON-DD';
    SQL> CREATE TABLE TABDATE(COLDATE DATE);
    SQL> INSERT INTO TABDATE(COLDATE)
    SELECT DECODE('1','0',NULL,'1',(TO_DATE('200511','RRRRMM')))
    FROM DUAL;
    SQL> SELECT TO_CHAR(COLDATE,'YYYY-MM-DD') FROM TABDATE;
    TO_CHAR(CO
    1905-11-01 -- 2005년이 들어가 있어야 하는데 오동작을 했다.
    2. nls_date_format을 'yyyy-mon-dd'로 하였을 경우
    SQL> ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MON-DD';
    SQL> INSERT INTO TABDATE(COLDATE)
    SELECT DECODE('1','0',NULL,'1',(TO_DATE('200511','RRRRMM')))
    FROM DUAL;
    SQL> SELECT TO_CHAR(COLDATE,'YYYY-MM-DD') FROM TABDATE;
    TO_CHAR(CO
    1905-11-01
    2005-11-01 -- 정상적인 값이 들어와 있다.
    3. 문제 설명
    어떻게 이런 문제가 발생하는가?
    이것은 dbms가 decode를 처리하는 내부적인 절차에 의해 벌어지는 것으로
    당연한 현상이다. decode를 처리할 경우 decode 안의 값이 to_date로
    처리되기 이전에 varchar2로 값을 넘겨 받아서 그 결과값으로 to_date
    함수에 넘겨저서 처리하게 된다.
    그런데 이 경우에 to_date 함수를 처리하기 전에 data의 conversion에
    이용되는 것이 시스템의 default NLS_DATE_FORMAT 값인 것이다.
    그러므로, 이 값의 년도 처리가 두 자리로 되어 있을 경우 년도를 두자리
    만을 처리하여 varchar2 값으로 넘기게 되고 이것을 to_date 함수를
    이용하여 처리하게 되므로 우리가 예상치 못한 값이 나오게 되는 것이다.
    실제 SQL이 다음과 같으면
    SELECT to_char(to_date('0511','yyMM'),'yyyymmdd') FROM DUAL;
    결과 값은 19051101로나오게 된다.
    Solution Description
    이 문제는 NLS_DATE_FORMAT의 년도가 두 자리로 지정된 경우에
    decode 함수를 사용하는 date data는 오동작을 할 가능성이 있다는 것이다.
    이에 대한 해결 방법은 nls_date_format의 년도를 네 자리로 지정해 주는 것이다.
    이에는 세 가지 방법이 있을 것이다.
    1. alter session set nls_date_format='yyyy-mm-dd';
    2. 환경변수의 nls_date_format을 변경하기.
    3. database 내의 nls_date_format를 변경하기.
    Reference Documents
    none

  • Having a problem with dates when I send my numbers doc to excel. dates are all out and that they have to cut and paste individual entries onto their spreadsheet. Any idea how I can prevent this

    having a problem with dates when I send my numbers doc to excel. dates are all out and that they have to cut and paste individual entries onto their spreadsheet. Any idea how I can prevent this.
    I'm using Lion on an MBP and Numbers is the latest version

    May you give more details about what is wrong with your dates ?
    M…oSoft products aren't allowed on my machines but I use LibreOffice which is a clone of Office.
    When I export from Numbers to Excel and open the result with LibreOffice, the dates are correctly treated.
    To be precise, dates after 01/01/1904 are correctly treated. dates before 01/01/1904 are exported as strings but, as it's flagged during the export process, it's not surprising.
    Yvan KOENIG (VALLAURIS, France) mardi 3 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : http://public.me.com/koenigyvan
    Please : Search for questions similar to your own before submitting them to the community
    For iWork's applications dedicated to iOS, go to :
    https://discussions.apple.com/community/app_store/iwork_for_ios

  • Problem with date format when ask prompt web-intelligence

    Bo XIR2 with 5 SP. Instaled on Windows 2003 with support Russian.
    Inside BO every labels, buttons - use russian. But when invoke web-report and Prompt appear there is problem with date format.
    Looks like korean format of date 'jj.nn.aaa H:mm:ss'.  I see system settings of date in Win .. everything right
    What i have to do?
    Where i can change format date for bo?

    GK, try this...
    decode(instr(packagename.functionname(param1 ,param2),'2400'), 0, to_date(to_char(to_date(rtrim(packagename.functionname(param1 ,param2),'(PT)'), 'Month dd, yyyy "at" hh24mi'),'mm/dd/yyyy hh24mi'),'mm/dd/yyyy hh24mi'),
                                                                      to_date(to_char(to_date(rtrim(packagename.functionname(param1 ,param2),'(PT)'), 'Month dd, yyyy "at" "2400"')+1,'mm/dd/yyyy "0000"'),'mm/dd/yyyy "0000"'))-Marilyn

  • Problem with Date format

    Got one more problem Merilyn and Radhakrishnan...
    Regarding the soln y provided me earler with the thread "Problem with date format"...
    What is happening is....I am able to change the 2400 to 0000 but when it is changed from 2400 on jan 1st to 0000 the hour is changing but not the date....the date still remains as jan 1st instead of jan 2nd....
    Eg: Jan 1st 2400 -- changed to -- jan1st 0000
    instead of jan 2nd 0000
    Could you please help me in this issue...
    Thanks,
    GK

    GK, try this...
    decode(instr(packagename.functionname(param1 ,param2),'2400'), 0, to_date(to_char(to_date(rtrim(packagename.functionname(param1 ,param2),'(PT)'), 'Month dd, yyyy "at" hh24mi'),'mm/dd/yyyy hh24mi'),'mm/dd/yyyy hh24mi'),
                                                                      to_date(to_char(to_date(rtrim(packagename.functionname(param1 ,param2),'(PT)'), 'Month dd, yyyy "at" "2400"')+1,'mm/dd/yyyy "0000"'),'mm/dd/yyyy "0000"'))-Marilyn

  • Problem with date calculation

    I am a rookie in SAP i have a small problem with date.Do we have any function module to find out the first day in a month if we give out the system current date ?? Pls help me out.

    Hi,
    As Ganesan told,you can do.
    Here is the sample code.
    data v type sy-datum.
    data d type DTRESR-WEEKDAY.
    v+6(2) = '01'.
    v4(2) = sy-datum4(2).
    v0(4) = sy-datum0(4).
    CALL FUNCTION 'DATE_TO_DAY'
      EXPORTING
        date          = v
    IMPORTING
       WEEKDAY       = d.
    write d.

  • Problem with date format from Oracle DB

    Hi,
    I am facing a problem with date fields from Oracle DB sources. The date format of the field in DB table is 'Date base type is DATE and DDIC type is DATS'.
    I mapped the date fields to Date characters in BI. Now the data that comes to PSA is in weird format. It shows like -0.PR.09-A
    I have changing the field settings in DataSource  to internal and external and also i have tried mapping these date fields to text fields with out luck. All delivers the same format.
    I have also tried using conversion routines like, CONVERSION_EXIT_IDATE_INPUT to change format. It also delivers me the same old result.
    If anybody of you have any suggestions or if anybody have you experienced such probelms, Please share your experience with me.
    Thanks in advance.
    Regards
    Varada

    Thanks for all your reply. I can only the solutions creating view in database. I want some solution to be done in BI. I appreciate if some of you have idea in it.
    The issue again in detail
    I am facing an issue with date fields from oracle data. The data that is sent from Oracle is in the format is -0.AR.04-M. I am able to convert this date in BI with conversion routine in BI into format 04-MAR-0.
    The problem is,  I am getting data of length 10 (Output format) in the format -0.AR.04-M where the month is not in numericals. Since it is in text it is taking one character spacing more.
    I have tried in different ways to convert and increased the length in BI, the result is same. I am wondering if we can change the date format in database.
    I am in puzzle with the this date format. I have checked other Oracle DB connections data for date fields in BI, they get data in the format 20.081.031 which will allow to convert this in BI. Only from the system i am trying creating a problem.
    Regards
    Varada

Maybe you are looking for