ORA-01850: hour must be between 0 and 23

Hi techies,
We have created a procedure for our daily report.its running fine for two location.when we run for a location we end up with this error.our current NLS_DATE_FORMAT is HH24:MI:SS.but its running successfully when we set nls_date_format='DD-MON-YY'.whereas other two (Which is same except a table from where it fetch data thru dblink) running properly with NLS_DATE_FORMAT is HH24:MI:SS.
ORA-01850: hour must be between 0 and 23
ORA-02063: preceding line from DW_TO_DIRC.NACALOGISTICS.COM
ORA-06512: at "OTSLGWEB.DAILY_JOB_PROFIT_REPORT_USA", line 89
ORA-06512: at line 1

Hi Techie,
Apologies for my vague post.
Here it would be clear.
My database NLS_DATE_FORMAT='HH24:MI:SS'
We have three procedure one is for AUSTRALIA,NEW ZEALAND and USA for daily report.all three are SAME CODE except a view whice is used inside the procedure from where these procedures get data thru dblink and create table in local database.
when i execute procdure for AUSTRALI AND NEW ZEALAND it was successfull whereas when i execute for USA it was failing with the error i above mentioned.
if I set
alter session set nls_date_format='DD-MON-YY';
and execute the USA Procedure it was successfully completing.
My question here is..
1.What was the real cause of this error?
2.if NLS settings are wrong.how the same code of AUSTRALIA AND NEW ZEALAND is successfull?
3.Can we add 'alter session set NLS_DATE_FORMAT='DD-MON-YY' inside the procedure? (We do not have approval to change this in DB level so we intend to add it in session level)
4.is it caused due to data?
Cheers
Sameer Ameen

Similar Messages

  • ORA-01850 Hour must be 0 and 23

    Hi all,
    I got the following procedure which in PL/SQL. I hv compiled with no problem in sql*plus. However, when I apply in Oracle apps. and attached with the value set for date parameter ( fdate & tdate ) I got the error message of ORA-01850 hour must be 0 and 23.
    Here is, my procedure look like :-
    CREATE OR REPLACE PROCEDURE AIC_PROC_AR_INTERFACE(ERRBUF OUT VARCHAR2,
    RETCODE OUT NUMBER,
                                  FDATE DATE,
                                  TDATE DATE) is
    VAR_BUF VARCHAR2(1000);
    Rcount NUMBER := 0;
    CURSOR C1 IS
    SELECT AID.INVOICENO RINVOICENO,
    AID.PACKAGE RPACKAGE,
         SUM(AID.ASSY_AMOUNT) RAMT,
         AID.BILLING_DATE RDATE
    FROM AIC_INVOICE_DETAIL@WSMLINK AID
    WHERE AID.BILLING_DATE >= to_date(FDATE || '00:00:00', 'DD-MON-YYYY HH24:MI:SS') AND AID.BILLING_DATE <= TO_DATE(TDATE || '23:59:59', 'DD-MON-YYYY HH24:MI:SS')
    AND AID.INVOICENO LIKE 'NS%'
    GROUP BY AID.INVOICENO, AID.PACKAGE, AID.BILLING_DATE;
    REC1 C1%ROWTYPE;
    BEGIN
    FOR REC1 IN C1 LOOP
    Begin
         SELECT COUNT(1) INTO rcount
    FROM AIC_INVOICE_STATUS
    WHERE INVOICENO = REC1.RINVOICENO;
    IF rcount = 0 then
         INSERT INTO AIC_INVOICE_STATUS VALUES ( REC1.RINVOICENO,'Y');
    COMMIT;
    END IF;
    End;
    END LOOP;
    RETURN;
    END;
    Thanks
    rgds
    Lim

    tdate and fdate are specified as dates:
    CREATE OR REPLACE PROCEDURE AIC_PROC_AR_INTERFACE(ERRBUF OUT VARCHAR2,
    RETCODE OUT NUMBER,
    FDATE DATE,
    TDATE DATE) iswhen you call your procedure convert your character strings into dates like this:
    AIC_PROC_AR_INTERFACE (p_errbuf, p_retcode,
                           to_date('15-OCT-2003', 'DD-MON-YYYY'),
                           to_date('15-OCT-2003', 'DD-MON-YYYY'));

  • ORA-1850: hor must be between 0 and 23 error

    Hi All
    i have the following table for creating and inserting i included only two fileds as these are the fields that i'm getting errors on.
    WITH     sample_data     AS
         SELECT     '50709' AS start_date, '2400' AS start_time  FROM dual     UNION ALL
         SELECT     '082510',              '0000'                  FROM dual
    SELECT       *
    FROM       sample_data
    ;DATA:
    START_DATE     START_TIME
    50709                        2400
    082510                        0000And now when i run the query against the table:
    SELECT   direction, car_count_pos, truck_count_pos,
             (car_count_pos + 2 * (truck_count_pos)) AS adjusted, car_count_neg,
             truck_count_neg,
             (car_count_neg + 2 * (truck_count_neg)) AS adjusted_neg,
             TO_DATE (start_date, 'MMDDYY') AS start_date,
             TO_DATE (end_date, 'MMDDYY') AS end_date,
             ROUND (TO_CHAR (TO_DATE (LPAD (start_time, 4, '0'), 'HH24MI'),
                             'HH24.MI'
                   ) AS start_time,
             start_time,
             (TO_DATE (end_date, 'MMDDYY') - TO_DATE (start_date, 'MMDDYY')
             ) AS days
        FROM (SELECT   (CASE
                           WHEN t1.direction = '1'
                              THEN (  COUNT (t1.bin_1_data)
                                    + COUNT (t1.bin_2_data)
                                    + COUNT (t1.bin_3_data) * 0.981 * 1.019
                           ELSE NULL
                        END
                       ) AS car_count_pos,
                       t1.direction,
                       (CASE
                           WHEN t1.direction = '1'
                              THEN (  COUNT (t1.bin_4_data)
                                    + COUNT (t1.bin_5_data)
                                    + COUNT (t1.bin_6_data)
                                    + COUNT (t1.bin_7_data)
                                    + COUNT (t1.bin_8_data)
                                    + COUNT (t1.bin_9_data)
                                    + COUNT (t1.bin_10_data)
                                    + COUNT (t1.bin_11_data)
                                    + COUNT (t1.bin_12_data)
                                    + COUNT (t1.bin_13_data)
                                    + COUNT (t1.bin_14_data)
                                    + COUNT (t1.bin_15_data) * 0.981 * 1.019
                           ELSE NULL
                        END
                       ) AS truck_count_pos,
                       (CASE
                           WHEN t1.direction = '3'
                              THEN (  COUNT (t1.bin_1_data)
                                    + COUNT (t1.bin_2_data)
                                    + COUNT (t1.bin_3_data) * 0.981 * 1.019
                           ELSE NULL
                        END
                       ) AS car_count_neg,
                       (CASE
                           WHEN t1.direction = '3'
                              THEN (  COUNT (t1.bin_4_data)
                                    + COUNT (t1.bin_5_data)
                                    + COUNT (t1.bin_6_data)
                                    + COUNT (t1.bin_7_data)
                                    + COUNT (t1.bin_8_data)
                                    + COUNT (t1.bin_9_data)
                                    + COUNT (t1.bin_10_data)
                                    + COUNT (t1.bin_11_data)
                                    + COUNT (t1.bin_12_data)
                                    + COUNT (t1.bin_13_data)
                                    + COUNT (t1.bin_14_data)
                                    + COUNT (t1.bin_15_data) * 0.981 * 1.019
                           ELSE NULL
                        END
                       ) AS truck_count_neg,
                       t2.start_date, t2.start_time, t2.end_date, t2.end_time
                  FROM bin_data t1, traffic_sample t2
                 WHERE t1.traffic_sample_id = t2.traffic_sample_id
              GROUP BY t1.direction,
                       t2.start_date,
                       t2.start_time,
                       t2.end_date,
                       t2.end_time)
       WHERE direction IN ('1', '3')
    GROUP BY TO_DATE (start_date, 'MMDDYY'),
             direction,
             car_count_pos,
             truck_count_pos,
             (car_count_pos + 2 * (truck_count_pos)),
             truck_count_neg,
             (car_count_neg + 2 * (truck_count_neg)),
             TO_DATE (end_date, 'MMDDYY'),
             ROUND (TO_CHAR (TO_DATE (LPAD (start_time, 4, '0'), 'HH24MI'),
                             'HH24.MI'
             start_time,
             car_count_negI'm getting the error
    ORA-1850: Hour must be between 0 and 23
    But as you see there is a value 2400 in the table is there any way to get around this? please need help.
    Thanks
    Edited by: thinkingeye on Aug 26, 2010 8:42 AM

    Thanks AP but i came up with something different which i guess sserved the same purpose i used the DECODE fucntion in the INNER query.
    SELECT   direction, car_count_pos, truck_count_pos,
             (car_count_pos + 2 * (truck_count_pos)) AS adjusted, car_count_neg,
             truck_count_neg,
             (car_count_neg + 2 * (truck_count_neg)) AS adjusted_neg,
             TO_DATE (start_date, 'MMDDYY') AS start_date,
             TO_DATE (end_date, 'MMDDYY') AS end_date,
             ROUND (TO_CHAR (TO_DATE (LPAD (start_time, 4, '0'), 'HH24MI'),
                             'HH24.MI'
                   ) AS start_time,
                   ROUND (TO_CHAR (TO_DATE (LPAD (end_time, 4, '0'), 'HH24MI'),
                             'HH24.MI'
                   ) AS end_time,
             start_time,
             (TO_DATE (end_date, 'MMDDYY') - TO_DATE (start_date, 'MMDDYY')
             ) AS days,
             CITY,COUNTY,LOCATION,ROUTE_NBR,ROUTE_TYPE
        FROM (SELECT   (CASE
                           WHEN t1.direction = '1'
                              THEN (  COUNT (t1.bin_1_data)
                                    + COUNT (t1.bin_2_data)
                                    + COUNT (t1.bin_3_data) * 0.981 * 1.019
                           ELSE NULL
                        END
                       ) AS car_count_pos,
                       t1.direction,
                       (CASE
                           WHEN t1.direction = '1'
                              THEN (  COUNT (t1.bin_4_data)
                                    + COUNT (t1.bin_5_data)
                                    + COUNT (t1.bin_6_data)
                                    + COUNT (t1.bin_7_data)
                                    + COUNT (t1.bin_8_data)
                                    + COUNT (t1.bin_9_data)
                                    + COUNT (t1.bin_10_data)
                                    + COUNT (t1.bin_11_data)
                                    + COUNT (t1.bin_12_data)
                                    + COUNT (t1.bin_13_data)
                                    + COUNT (t1.bin_14_data)
                                    + COUNT (t1.bin_15_data) * 0.981 * 1.019
                           ELSE NULL
                        END
                       ) AS truck_count_pos,
                       (CASE
                           WHEN t1.direction = '3'
                              THEN (  COUNT (t1.bin_1_data)
                                    + COUNT (t1.bin_2_data)
                                    + COUNT (t1.bin_3_data) * 0.981 * 1.019
                           ELSE NULL
                        END
                       ) AS car_count_neg,
                       (CASE
                           WHEN t1.direction = '3'
                              THEN (  COUNT (t1.bin_4_data)
                                    + COUNT (t1.bin_5_data)
                                    + COUNT (t1.bin_6_data)
                                    + COUNT (t1.bin_7_data)
                                    + COUNT (t1.bin_8_data)
                                    + COUNT (t1.bin_9_data)
                                    + COUNT (t1.bin_10_data)
                                    + COUNT (t1.bin_11_data)
                                    + COUNT (t1.bin_12_data)
                                    + COUNT (t1.bin_13_data)
                                    + COUNT (t1.bin_14_data)
                                    + COUNT (t1.bin_15_data) * 0.981 * 1.019
                           ELSE NULL
                        END
                       ) AS truck_count_neg,
                       t2.start_date, t2.start_time, t2.end_date,*decode(t2.END_TIME,2400,'2359',t2.end_time) as end_time*,t3.CITY, t3.COUNTY,t3.LOCATION,t3.ROUTE_NBR, t3.ROUTE_TYPE
                  FROM bin_data t1, traffic_sample t2,location_details t3
                 WHERE t1.traffic_sample_id = t2.traffic_sample_id
                 and t2.TRAFFIC_SAMPLE_ID=t3.TRAFFIC_SAMPLE_ID
              GROUP BY t1.direction,
                       t2.start_date,
                       t2.start_time,
                       t2.end_date,
                       t2.end_time,
                       t3.CITY, t3.COUNTY,t3.LOCATION,t3.ROUTE_NBR, t3.ROUTE_TYPE)
       WHERE direction IN ('1', '3')
    GROUP BY TO_DATE (start_date, 'MMDDYY'),
             direction,
             car_count_pos,
             truck_count_pos,
             (car_count_pos + 2 * (truck_count_pos)),
             truck_count_neg,
             (car_count_neg + 2 * (truck_count_neg)),
             TO_DATE (end_date, 'MMDDYY'),
             ROUND (TO_CHAR (TO_DATE (LPAD (start_time, 4, '0'), 'HH24MI'),
                             'HH24.MI'
             start_time,
             car_count_neg,
             end_time,
             CITY,COUNTY,LOCATION,ROUTE_NBR,ROUTE_TYPE

  • Hour must be between 1 and 12

    UPDATE ATTENDENCE SET OUTTIME=TO_TIMESTAMP('" + attendence.getLeaveTime() + "','HH:MI AM') WHERE EMPID='" + attendence.getEmpID() + "' AND ATTENDENCEDATE=to_date('" + attendence.getDate() + "','YYYY-MM-DD')
    attendence.getLeaveTime's return type is Time Stamp. I got error "hour must be between 1 and 12". I passed time stamp like this. setLeaveTime(new Timestamp(inTime.getTime()))
    Edited by: 993001 on Mar 24, 2013 9:47 AM

    CREATE TABLE "ELAMOR"."ATTENDENCE"
    (     "ATTENDENCEID" VARCHAR2(20 BYTE) NOT NULL ENABLE,
         "INTIME" TIMESTAMP (6) NOT NULL ENABLE,
         "OUTTIME" TIMESTAMP (6) NOT NULL ENABLE,
         "EMPID" VARCHAR2(20 BYTE) NOT NULL ENABLE,
         "ATTENDENCEDATE" DATE,
         CONSTRAINT "ATTENDENCE_PK" PRIMARY KEY ("ATTENDENCEID")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
    TABLESPACE "USERS" ENABLE,
         CONSTRAINT "ATTENDENCE_EMPLOYEE_FK1" FOREIGN KEY ("EMPID")
         REFERENCES "ELAMOR"."EMPLOYEE" ("EMPID") ON DELETE CASCADE ENABLE
    ) SEGMENT CREATION IMMEDIATE
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
    TABLESPACE "USERS" ;

  • Error: ORA-01847: day of month must be between 1 and last day of month

    Hi,
    I am getting this ORA-01847: day of month must be between 1 and last day of month type of error but I have checked my data all are correct.
    I am inserting the data in the merge query. It is giving the above error.
    but when i insert the data like that
    insert into dt(start_date) select TO_DATE (tariff_start_date, 'DD/MM/RRRR') from ext_zpp0a871;
    It does not give any error.
    Please find the below code
    DECLARE
    l_sv_error_msg VARCHAR2 (1000);
    BEGIN
    FOR i IN (SELECT condition_type, sales_org, division_channel, division,
    price_list, ean_upc, amount, unit_of_measure1,
    tariff_start_date, tariff_end_date
    FROM ext_zpp0a871--This is external table
    WHERE condition_type = 'ZPP0' AND ROWNUM < 200)
    LOOP
    BEGIN
    MERGE INTO sap_tariff st
    USING (SELECT i.price_list pl, i.ean_upc upc,
    TO_DATE (i.tariff_start_date, 'DD/MM/RRRR') tsd,
    TO_DATE (i.tariff_end_date, 'DD/MM/RRRR') ted
    FROM DUAL) du
    ON (st.prod_ean_cuni = du.upc
    AND st.pricelist = du.pl
    AND st.tariff_start_date = du.tsd
    AND st.tariff_end_date = du.ted)
    WHEN MATCHED THEN
    UPDATE
    SET st.condition_type = i.condition_type,
    st.sales_org = i.sales_org,
    st.division_channel = i.division_channel,
    st.division = i.division,
    st.amount =
    TO_NUMBER (REPLACE (REPLACE (i.amount, '.', NULL),
    st.uom = i.unit_of_measure1
    WHEN NOT MATCHED THEN
    INSERT (condition_type, sales_org, division_channel, division,
    pricelist, prod_ean_cuni, amount, uom,
    tariff_start_date, tariff_end_date)
    VALUES (i.condition_type, i.sales_org, i.division_channel,
    i.division, i.price_list, i.ean_upc,
    TO_NUMBER (REPLACE (REPLACE (i.amount, '.', NULL),
    i.unit_of_measure1,
    TO_DATE (i.tariff_start_date, 'DD/MM/RRRR'),
    TO_DATE (i.tariff_end_date, 'DD/MM/RRRR'));
    /*INSERT INTO sap_tariff
    (condition_type, sales_org, division_channel,
    division, pricelist, prod_ean_cuni,
    amount,
    uom,
    tariff_start_date,
    tariff_end_date
    VALUES (i.condition_type, i.sales_org, i.division_channel,
    i.division, i.price_list, i.ean_upc,
    TO_NUMBER (REPLACE (REPLACE (i.amount, '.', NULL),
    i.unit_of_measure1,
    TO_DATE (i.tariff_start_date, 'DD/MM/RRRR'),
    TO_DATE (i.tariff_end_date, 'DD/MM/RRRR')
    EXCEPTION
    WHEN DUP_VAL_ON_INDEX
    THEN
    UPDATE sap_tariff
    SET condition_type = i.condition_type,
    sales_org = i.sales_org,
    division_channel = i.division_channel,
    division = i.division,
    amount =
    TO_NUMBER (REPLACE (REPLACE (i.amount, '.', NULL),
    uom = i.unit_of_measure1;
    WHEN OTHERS
    THEN
    l_sv_error_msg := SQLERRM (SQLCODE);
    INSERT INTO sap_tariff_log
    (date_of_load, condition_type, sales_org,
    division_channel, division, price_list,
    prod_ean_cuni, amount, uom,
    tariff_start_date, tariff_end_date,
    rejection_reason
    VALUES (SYSDATE, i.condition_type, i.sales_org,
    i.division_channel, i.division, i.price_list,
    i.ean_upc, i.amount, i.unit_of_measure1,
    i.tariff_start_date, i.tariff_end_date,
    l_sv_error_msg
    END;
    END LOOP;
    COMMIT;
    EXCEPTION
    WHEN OTHERS
    THEN
    l_sv_error_msg := SQLERRM (SQLCODE);
    neo_pro_log ('Others Error', l_sv_error_msg);
    END;

    user13400510 wrote:
    but when i insert the data like that
    insert into dt(start_date) select TO_DATE (tariff_start_date, 'DD/MM/RRRR') from ext_zpp0a871;
    It does not give any error.Maybe the error is on tariff_end_date instead of tariff_start_date ?
    What are the datatypes of tariff_start_date and tariff_end_date ? If they are already dates, and you to_date them (and depending on what your nls_date_xxxxx params are) you can have such errors :SQL> sho parameter nls_date_format
    NAME_COL_PLUS_SHOW_PARAM                 TYPE        VALUE_COL_PLUS_SHOW_PARAM
    nls_date_format                          string      DD/MM/YYYY
    SQL> select to_date(sysdate,'Day dd Mon RRRR') from dual;
    select to_date(sysdate,'Day dd Mon RRRR') from dual
    ERROR at line 1:
    ORA-01846: not a valid day of the week
    SQL> select to_date(sysdate,'hh24:mi:ss dd/mm/rrrr') from dual;
    select to_date(sysdate,'hh24:mi:ss dd/mm/rrrr') from dual
    ERROR at line 1:
    ORA-01850: hour must be between 0 and 23

  • Regarding the error ORA-01841: (full) year must be between -4713 and +9999,

    The issue is the code is not inserting the good records into the MIE table. This is becasue of the error 'OtherError GFSTM_INS_SNURK_NEW_TABLES_PA.gfstm_ins_asn_journal_pr:ORA-01841: (full) year must be between -4713 and +9999, and not be 0' This error is throwing out because of space issue in dt_asn_shipped.
    My requirement is to log error if any if not get the next record in the loop and insert it in the table if it has no error. The issue is good records are not getting inserted. The snurk_cmms_crct018_asn_journl in the cursor is a synonym which uses dblionk to connect to the remote db. The dt_asn_shipped data type is char(6) and the format is YYMMDD.
    declare
    CURSOR cur_asn_journal IS
    SELECT NVL(TRIM(cd_asn_plant),' ') cd_asn_plant,
         NVL(TRIM(no_journal),0) no_journal,
    NVL(TRIM(cd_ship_from),' ') cd_ship_from,
         TRIM(no_asn) no_asn,
    DECODE(LENGTH(dt_asn_shipped),6, to_date(to_char(to_date(trim(dt_asn_shipped),'YYMMDD'),
    'DD-MON-YY'),'DD-MON-YY'), '') dt_asn_shipped,
    TRIM(dt_processed) dt_processed,
    TRIM(in_manual) in_manual,
         TRIM(ts_last_update) ts_last_update     
    FROM snurk_cmms_crct018_asn_journl;
    BEGIN
    FOR l_rec_asn_journal IN cur_asn_journal LOOP
    BEGIN
    INSERT INTO gfstmie_st_cmms_asn_journal
    gsdb_site_code ,
    journal_num,
    gsdb_site_from_code,
    adv_shipping_notice_cnum,
    adv_sn_shipping_date,
    processed_date,
    manual_in_code,
    cmms_last_update_cdate,
    create_userid,
    create_dts,
    update_userid,
    update_dts
    ) VALUES
    l_rec_asn_journal.cd_asn_plant,
    l_rec_asn_journal.no_journal,
    l_rec_asn_journal.cd_ship_from,
    l_rec_asn_journal.no_asn,
    l_rec_asn_journal.dt_asn_shipped,
    l_rec_asn_journal.dt_processed,
    l_rec_asn_journal.in_manual,
    l_rec_asn_journal.ts_last_update,
    g_con_user_id,
         l_dts_current_gmt,
    g_con_user_id,
    l_dts_current_gmt
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('l_num_exception_pt_7');
    --To assign value to error attributes
    l_str_email_body := GFSTU_MSG_CONTEXT_STACKER_PA.gfstu_add_msg_context_fn(
    SQLERRM || l_str_process_track,
    g_con_package_name || l_con_proc_name,
    g_con_string_null);
    l_rec_apm_error_attributes.job_run_sakey := l_num_job_run_id;
    l_rec_apm_error_attributes.proj_acronym_code := GFSTM_PARM_SPECIFICATION_PA.g_con_proj_acronym_code_ta;           
    l_rec_apm_error_attributes.module_code := l_con_module_code;
    l_rec_apm_error_attributes.notes_text := l_str_email_body;
    l_rec_apm_error_attributes.msg_id := GFSTM_PARM_SPECIFICATION_PA.g_con_msg_id_invalid_date;
    --Calling procedure to log and notify subscribers of transaction
    --related errors and informational messages
    GFSTM_COMMON_UTL_PA.gfstm_log_message_pr(
    SUBSTR(l_str_email_body,1,2000),
    g_con_string_null,
    g_con_string_null,
    SUBSTR(l_str_email_body,1,2000),
    l_rec_apm_error_attributes,
    g_con_string_null,
    l_num_wait_time,
    l_num_wait_interval_time,
    l_str_msg_action_code,
    l_num_oracle_error_code,
    l_str_oracle_msg,
    l_num_return_code,
    l_num_status);
    END;
    END LOOP;
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('l_num_exception_pt_12');
    DBMS_OUTPUT.PUT_LINE('l_num_exception_pt_2 '||l_str_procg_mode_code);
    --Rollback uncommitted transactions
    ROLLBACK;
    --Assigning failure status
    o_num_status := g_con_status_failure;
    --Assigning procedure end time in GMT
    l_dts_end_time := GFSTU_DATETIME_UTILITIES_PA.gfstu_to_gmt_fn;
    --To assign value to error attributes
    l_str_email_body := GFSTU_MSG_CONTEXT_STACKER_PA.gfstu_add_msg_context_fn(
    SQLERRM || l_str_process_track,
    g_con_package_name || l_con_proc_name,
    g_con_string_null);
    l_rec_apm_error_attributes.job_run_sakey := l_num_job_run_id;
    l_rec_apm_error_attributes.proj_acronym_code := GFSTM_PARM_SPECIFICATION_PA.g_con_proj_acronym_code_ta;           
    l_rec_apm_error_attributes.module_code := l_con_module_code;
    l_rec_apm_error_attributes.notes_text := l_str_email_body;
    l_rec_apm_error_attributes.msg_id := GFSTM_PARM_SPECIFICATION_PA.g_con_msg_id_oracle;
    --Calling procedure to log and notify subscribers of transaction
    --related errors and informational messages
    GFSTM_COMMON_UTL_PA.gfstm_log_message_pr(
    SUBSTR(l_str_email_body,1,2000),
    g_con_string_null,
    g_con_string_null,
    SUBSTR(l_str_email_body,1,2000),
    l_rec_apm_error_attributes,
    g_con_string_null,
    l_num_wait_time,
    l_num_wait_interval_time,
    l_str_msg_action_code,
    l_num_oracle_error_code,
    l_str_oracle_msg,
    l_num_return_code,
    l_num_status);
    --Calling procedure to update the job status
    GFSTM_COMMON_UTL_PA.gfstm_update_job_status_pr(
    l_num_job_run_id,
    GFSTM_PARM_SPECIFICATION_PA.g_con_process_abort,
    l_dts_end_time,
    g_con_perf_metric_code,
    g_con_zero,
    g_con_n,
    l_num_oracle_error_code,
    l_str_oracle_msg,
    l_num_return_code,
    l_num_status);
    END ;
    Thanks,
    Vinodh

    Hi,
    Could you not have reduced your question to what is relevant?
    You seem to be saying that this is your problem:
    SELECT DECODE ( LENGTH (dt_asn_shipped),
              6,
              TO_DATE ( TO_CHAR ( TO_DATE ( TRIM (dt_asn_shipped), 'YYMMDD'), 'DD-MON-YY'), 'DD-MON-YY'),
             dt_asn_shipped
    FROM   snurk_cmms_crct018_asn_journl;As far as I can see, problem might be that you decode on UNTRIMMED length.
    Also, you could get rid of some the to_date(to_char(to_date), which is nothing more than simply to_date()
    Try something like
    SELECT CASE LENGTH (TRIM (dt_asn_shipped))
             WHEN 6 THEN TO_DATE ( TRIM (dt_asn_shipped), 'YYMMDD')
           END
             dt_asn_shipped
    FROM   snurk_cmms_crct018_asn_journl;Regards
    Peter

  • Error ORA-01841: (full) year must be between -4713 and +9999, and not be 0

    Hi Experts,
    I seem to be getting the error "Error ORA-01841: (full) year must be between -4713 and +9999, and not be 0" when my dates are in the year 2000. Here's my SQL:
    DROP TABLE PER_ALL_ASSIGNMENTS_M_XTERN;
    create table PER_ALL_ASSIGNMENTS_M_XTERN(
    PERSON_NUMBER                    VARCHAR2(30 CHAR),
    ASSIGNMENT_NUMBER VARCHAR2(30 CHAR),
    EFFECTIVE_START_DATE                DATE,
    EFFECTIVE_END_DATE           DATE,
    EFFECTIVE_SEQUENCE           NUMBER(4),
    ASS_ATTRIBUTE_CATEGORY           VARCHAR2(30 CHAR),
    ASS_ATTRIBUTE1 VARCHAR2(150 CHAR),
    ASS_ATTRIBUTE_NUMBER20 NUMBER,
    ASS_ATTRIBUTE_DATE1 DATE,
    ASS_ATTRIBUTE_DATE2 DATE,
    ASS_ATTRIBUTE_DATE3 DATE,
    ASS_ATTRIBUTE_DATE4 DATE,
    ASS_ATTRIBUTE_DATE5 DATE,
    ASS_ATTRIBUTE_DATE6 DATE,
    ASS_ATTRIBUTE_DATE7 DATE,
    ASS_ATTRIBUTE_DATE8 DATE,
    ASS_ATTRIBUTE_DATE9 DATE,
    ASS_ATTRIBUTE_DATE10 DATE,
    ASS_ATTRIBUTE_DATE11 DATE,
    ASS_ATTRIBUTE_DATE12 DATE,
    ASS_ATTRIBUTE_DATE13 DATE,
    ASS_ATTRIBUTE_DATE14 DATE,
    ASS_ATTRIBUTE_DATE15 DATE,
    ASG_INFORMATION_CATEGORY           VARCHAR2(30 CHAR),
    ASG_INFORMATION1 VARCHAR2(150 CHAR),
    ASG_INFORMATION_NUMBER20 NUMBER,
    ASG_INFORMATION_DATE1 DATE,
    ASG_INFORMATION_DATE2 DATE,
    ASG_INFORMATION_DATE3 DATE,
    ASG_INFORMATION_DATE4 DATE,
    ASG_INFORMATION_DATE5 DATE,
    ASG_INFORMATION_DATE6 DATE,
    ASG_INFORMATION_DATE7 DATE,
    ASG_INFORMATION_DATE8 DATE,
    ASG_INFORMATION_DATE9 DATE,
    ASG_INFORMATION_DATE10 DATE,
    ASG_INFORMATION_DATE11 DATE,
    ASG_INFORMATION_DATE12 DATE,
    ASG_INFORMATION_DATE13 DATE,
    ASG_INFORMATION_DATE14 DATE,
    ASG_INFORMATION_DATE15 DATE
    organization external
    ( default directory APPLCP_FILE_DIR
    access parameters
    ( records delimited by newline skip 1
         badfile APPLCP_FILE_DIR:'PER_ALL_ASSIGNMENTS_M_XTERN.bad'
    logfile APPLCP_FILE_DIR:'PER_ALL_ASSIGNMENTS_M_XTERN.log'
    fields terminated by ',' OPTIONALLY ENCLOSED BY '"'
    (PERSON_NUMBER,     
    ASSIGNMENT_NUMBER,
    EFFECTIVE_START_DATE CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    EFFECTIVE_END_DATE CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    EFFECTIVE_SEQUENCE,
    ASS_ATTRIBUTE_CATEGORY,
    ASS_ATTRIBUTE1,
    ASS_ATTRIBUTE_NUMBER20,
    ASS_ATTRIBUTE_DATE1 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE2 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE3 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE4 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE5 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE6 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE7 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE8 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE9 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE10 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE11 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE12 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE13 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE14 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASS_ATTRIBUTE_DATE15 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_CATEGORY,
    ASG_INFORMATION1,
    ASG_INFORMATION_NUMBER20,
    ASG_INFORMATION_DATE1 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE2 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE3 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE4 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE5 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE6 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE7 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE8 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE9 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE10 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE11 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE12 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE13 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE14 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY",
    ASG_INFORMATION_DATE15 CHAR(20) DATE_FORMAT DATE MASK "DD-MON-YYYY"
    location ('PER_ALL_ASSIGNMENTS_M.csv')
    REJECT LIMIT UNLIMITED;
    ...and getting errors when data looks like the following:
    E040101,EE040101,*1-Aug-2000*,31-Dec-4712,1,,NDVC,YES,DE,SFC,N,STIP Plan - Pressure,,,,,,,E040101,,,,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,5,,,,,,,,,,,,31113,31113,31113,31113,31113,31113,,,1-Jan-2012,31-Dec-2012,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    ...error message:
    error processing column EFFECTIVE_START_DATE in row 19 for datafile /u05/dbadir/jmf/incident_logs/PER_ALL_ASSIGNMENTS_M.csv
    ORA-01841: (full) year must be between -4713 and +9999, and not be 0
    Thanks,
    Thai

    Here is a snippet of the bad file data:
    E040110,EE040110,01-Aug-00,31-Dec-12,1,,NDVC,YES,DE,SFC,N,STIP Plan - Pressure,,,,,,,E040110,,,,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,5,,,,,,,,,,,,27667.2,27667.2,27667.2,27667.2,27667.2,27667.2,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    E040100,EE040100,01-May-00,31-Dec-12,1,,NDVC,YES,DE,SFC,N,STIP Plan - Pressure,,,,,,,E040100,,,,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,5,,,,,,,,,,,,31113,31113,31113,31113,31113,31113,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    E040101,EE040101,01-Aug-00,31-Dec-12,1,,NDVC,YES,DE,SFC,N,STIP Plan - Pressure,,,,,,,E040101,,,,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,5,,,,,,,,,,,,31113,31113,31113,31113,31113,31113,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    E000916,EE000916,01-Oct-00,31-Dec-12,1,,NDVC,YES,NL,SFC-Commercial,E,SIP Plan - Control Technologies,,,,,,,E000916,21000000,555000,99000,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,10,,,,,,,,,,,,34905.65,34905.65,34905.65,34905.65,34905.65,34905.65,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    E000807,EE000807,03-Jan-00,31-Dec-12,1,,NDVC,YES,FR,SFC-Commercial,E,STIP Plan - Cross BU,,,,,,,E000807,,,,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,3,,,,,,,,,,,,35448.56,35448.56,35448.56,35448.56,35448.56,35448.56,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    E000851,EE000851,25-Apr-00,31-Dec-12,1,,NDVC,YES,FR,SFC-Commercial,E,SIP Plan - Control Technologies,,,,,,,E000851,21000000,555000,99000,2080,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,13,,,,,,,,,,,,43283.76,43283.76,43283.76,43283.76,43283.76,43283.76,,,01-Jan-12,31-Dec-12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    So, the successfully loaded data is being loaded where year=2003 in the CSV as year=0003. Even though the data is loaded fine the data is not correct. For some reason the external table is set to have the year truncated.

  • ORA-01847: day of month must be between 1 and last day of month error

    Hi All
    When i run the following code i'm getting the error:ORA-01847: day of month must be between 1 and last day of month error
    SELECT t2.owner_cat,
    t1.owner_id,
    stock_id,
    Sum(received_amount) received_amount,
    Sum(curr_amount) curr_amount,
    Sum(used_amount) used_amount,
    To_char(Add_months(date_work,6),'YYYY') date_work
    FROM (SELECT owner_id_to owner_id,
    stock_id_to stock_id,
    Sum(full_amount) received_amount,
    0 curr_amount,
    0 used_amount,
    To_char(0) date_work
    FROM dw_wms_mat_transfer
    WHERE master_code_id IN ('8664','8665')
    GROUP BY owner_id_to,
    stock_id_to
    UNION ALL
    SELECT owner_id,
    stock_id,
    0 received_amount,
    Sum(curr_amount) curr_amount,
    0 used_amount,
    To_char(0) date_work
    FROM dw_wms_mat_inv
    WHERE master_code_id IN ('8664','8665')
    GROUP BY owner_id,
    stock_id
    UNION ALL
    SELECT t2.owner_id,
    t1.stock_id,
    0 received_amt,
    0 curr_amt,
    Sum(amount) used_amt,
    To_char(Add_months(date_work,6),'YYYY') date_work
    FROM dw_wms_wo_mat_dc t1,
    (SELECT owner_id,
    stock_id
    FROM dw_wms_mat_inv
    WHERE master_code_id IN ('8664','8665')
    GROUP BY owner_id,
    stock_id) t2
    WHERE t1.stock_id = t2.stock_id
    GROUP BY t2.owner_id,
    t1.stock_id,
    To_char(Add_months(date_work,6),'YYYY')) t1,
    dw_wms_setup_owner t2
    WHERE t1.owner_id = t2.owner_id
    GROUP BY t2.owner_cat,
    t1.owner_id,
    stock_id,
    To_char(Add_months(date_work,6),'YYYY')
    But when i just run the inner query:
    (SELECT owner_id_to owner_id,
    stock_id_to stock_id,
    Sum(full_amount) received_amount,
    0 curr_amount,
    0 used_amount,
    To_char(0) date_work
    FROM dw_wms_mat_transfer
    WHERE master_code_id IN ('8664','8665')
    GROUP BY owner_id_to,
    stock_id_to
    UNION ALL
    SELECT owner_id,
    stock_id,
    0 received_amount,
    Sum(curr_amount) curr_amount,
    0 used_amount,
    To_char(0) date_work
    FROM dw_wms_mat_inv
    WHERE master_code_id IN ('8664','8665')
    GROUP BY owner_id,
    stock_id
    UNION ALL
    SELECT t2.owner_id,
    t1.stock_id,
    0 received_amt,
    0 curr_amt,
    Sum(amount) used_amt,
    To_char(Add_months(date_work,6),'YYYY') date_work
    FROM dw_wms_wo_mat_dc t1,
    (SELECT owner_id,
    stock_id
    FROM dw_wms_mat_inv
    WHERE master_code_id IN ('8664','8665')
    GROUP BY owner_id,
    stock_id) t2
    WHERE t1.stock_id = t2.stock_id
    GROUP BY t2.owner_id,
    t1.stock_id,
    To_char(Add_months(date_work,6),'YYYY'))
    I'm not getting that error, any help please?

    Hi,
    Like Anuraq already explained, you need to keep in mind that when you apply a to_char, you've turned your DATE datatype into a STRING and by doing that you've lost the ability to use the add_months function again in your outer query.
    Using a simplified example, extracted from your example:
    MHO%xe> select to_char(add_months(date_work, 6), 'yyyy') date_work
      2  from ( select to_char(0) date_work
      3         from dual
      4         union all
      5         select to_char(0) date_work
      6         from dual
      7         union all
      8         select to_char(add_months(sysdate, 6), 'yyyy') date_work
      9         from dual
    10       );
    select to_char(add_months(date_work, 6), 'yyyy') date_work
    FOUT in regel 1:
    .ORA-01847: day of month must be between 1 and last day of monthHowever, you should either do something like:
    MHO%xe> select nvl(to_char(add_months(date_work, 12), 'yyyy'), '0') date_work
      2  from ( select to_date(null) date_work
      3         from dual
      4         union all
      5         select to_date(null) date_work
      6         from dual
      7         union all
      8         select sysdate date_work
      9         from dual
    10       );
    DATE
    0
    0
    2010or (less clear, more confusing):
    MHO%xe> select nvl(to_char(add_months(date_work, 6), 'yyyy'), '0') date_work
      2  from ( select to_date(null) date_work
      3         from dual
      4         union all
      5         select to_date(null) date_work
      6         from dual
      7         union all
      8         select add_months(sysdate, 6) date_work
      9         from dual
    10       );
    DATE
    0
    0
    2010It's not clear to me why you're using add_months twice (inner + outer query) in your original example.
    As you can see you can get the same results using it only once in your outer query.

  • Day must be between 1 and last day of month

    Hi
    I have a master detail form for overtime entries.
    Master Block contain emp_no,name,month etc.
    Detail block contain a date field ,,from time, to time etc
    when i enter the date in detail block it defaults the month from Server date and i am getting the error "Day must be between 1 and last day of ...."
    The form is going to reside on server so i cant go for changing system date for that.
    THe work around i am trying is i have created a dummy item in detail block for Date(dd) entry and populating my original date field on the basis of it.
    so that i can get rid of last day validation of month.The datatype of dummy item is char
    my code is
    c_day varchar(2);
    c_month varchar(2);
    c_year varchar(4);
    d_date varchar(8);
    begin
    c_day := :DETAIL.dummy;
    c_month := to_char(:MASTER.month, 'mm');
    c_year := to_char(:master.month, 'yyyy');
    d_date := c_day||c_month||c_year;
    :DETAIL.ot_date := to_date(d_date,'ddmmyyyy');
    end;
    I am using post change trigger on my dummy item but i am getting ORA-01840 for that.I have tried several ways but it is giving different type of date errors for that.
    Any help is highly appreciated

    Dear try this
    SELECT RUN_NUM, CV AS MONTH_DATE
    FROM
    SELECT ROWNUM AS RUN_NUM,TO_DATE('01-' || 'SEP' || '-' || 2007 ,'DD/MM/YYYY')+ (ROWNUM-1) CV
    FROM
    (SELECT 1 FROM DUAL GROUP BY CUBE (1,1,1,1,1)) A
    WHERE TO_CHAR(CV,'MON-YYYY') = 'SEP-2007'

  • SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

    Here is sql Store procedure
    Create procedure InsertResMasterNEW 
            @urm_id int output, 
            @upm_sector varchar(60) , @upm_block varchar(50) , @upm_plot varchar(50) , @urm_entry_dt datetime, 
            @urm_loc_adv varchar(50) ,@urm_alott_catg varchar(50) , @urm_grnd_rent numeric(18,0) , @urm_grnd_rent_pp varchar(50), 
            @urm_grnd_rent_desc varchar(50) ,   @urm_resi varchar(50) , @urm_shop_allowed varchar(50) , @urm_non_resi varchar(50), 
            @urm_yes_resi varchar(50) , @urm_allot_no varchar(50),  @urm_allot_dt datetime ,    @urm_reg_dt datetime, 
            @urm_exe_dt datetime , @urm_coop_name varchar(50) , @urm_coop_reg_no varchar(50) ,  @urm_org_cost numeric(18,0), 
            @urm_bp_cost numeric(18,0) ,    @urm_interest_paid numeric(18,0) ,  @urm_amount_paid numeric(18,0) ,    @urm_bal_due numeric(18,0), 
            @urm_poss_dt datetime , @urm_poss_cert_no varchar(50) ,  @urm_poss_type varchar(50) , @urm_grnd_rentupto_yr numeric(18,0) , 
            @urm_grnd_rent_paid numeric(18,0) , @urm_grnd_rent_bal numeric(18,0) ,  @urm_pln_submitted varchar(50) , @urm_pln_subm_org_dt datetime, 
            @urm_pln_subm_org_no varchar(50) ,  @urm_pln_subm_rem varchar(50) , @urm_pln_sanctioned varchar(50) , @urm_pln_sanc_org_dt datetime, 
            @urm_pln_sanc_no    varchar(50) ,   @urm_pln_sanc_rem varchar(50) , @urm_pln_sanc_rev_dt datetime , @urm_pln_sanc_rev_no varchar(50), 
            @urm_const_status varchar(50) , @urm_const_storeys varchar(50) , @urm_pln_storeys   varchar(50) , @urm_comp_storeys varchar(50) , 
            @urm_const_rem varchar(50) ,  @urm_comm_util varchar(50) , @urm_comm_util_other varchar(50) , @urm_pub_util varchar(50), 
            @urm_pub_util_other varchar(50) ,   @urm_ind_util1 varchar(50) , @urm_plot_lease_ownby varchar(50) , @urm_prev_alloted varchar(50), 
            @urm_whose_fav varchar(50) , @urm_tenyr_exp varchar(50) , @urm_tenyr_org_dt datetime , @urm_tenyr_org_no varchar(50), 
            @urm_tenyr_rev_dt datetime , @urm_tenyr_rev_no varchar(50) , @urm_tenyr_rem varchar(50) , @urm_cc_rem varchar(50) 
    AS 
    Declare @urm_upm_id int 
    Begin 
    select @urm_upm_id=upm_id from URB_PLOT_MASTER  
        where upm_sector=@upm_sector  
        and   upm_block=@upm_block  
        and   upm_plot=@upm_plot  
    Insert into URB_RES_MASTER( urm_upm_id  , 
                                urm_entry_dt , urm_loc_adv , urm_alott_catg , urm_grnd_rent, 
                                urm_grnd_rent_pp,  urm_grnd_rent_desc, urm_resi,   
                                urm_shop_allowed,  urm_non_resi,  urm_yes_resi,  urm_allot_no, 
                                urm_allot_dt, urm_reg_dt,  urm_exe_dt,  urm_coop_name, 
                                urm_coop_reg_no, urm_org_cost, urm_bp_cost, urm_interest_paid,  
                                urm_amount_paid,  urm_bal_due,  urm_poss_dt,  urm_poss_cert_no,   
                                urm_poss_type, urm_grnd_rentupto_yr, urm_grnd_rent_paid,  urm_grnd_rent_bal,  
                                urm_pln_submitted,  urm_pln_subm_org_dt,  urm_pln_subm_org_no,  urm_pln_subm_rem, 
                                urm_pln_sanctioned, urm_pln_sanc_org_dt,  urm_pln_sanc_no, urm_pln_sanc_rem,  
                                urm_pln_sanc_rev_dt, urm_pln_sanc_rev_no,urm_const_status, urm_const_storeys,  
                                urm_pln_storeys,  urm_comp_storeys,  urm_const_rem,  urm_comm_util,   
                                urm_comm_util_other,  urm_pub_util, urm_pub_util_other, urm_ind_util1,   
                                urm_plot_lease_ownby, urm_prev_alloted, urm_whose_fav,  urm_tenyr_exp, 
                                urm_tenyr_org_dt, urm_tenyr_org_no, urm_tenyr_rev_dt, urm_tenyr_rev_no,  
                                urm_tenyr_rem, urm_cc_rem ) 
                        values( @urm_upm_id,   @urm_entry_dt, @urm_loc_adv ,  @urm_alott_catg , 
                                @urm_grnd_rent,  @urm_grnd_rent_pp,  @urm_grnd_rent_desc, @urm_resi,   
                                @urm_shop_allowed, @urm_non_resi,  @urm_yes_resi,  @urm_allot_no,  
                                @urm_allot_dt,  @urm_reg_dt,  @urm_exe_dt, @urm_coop_name,   
                                @urm_coop_reg_no ,  @urm_org_cost,  @urm_bp_cost,   
                                @urm_interest_paid,  @urm_amount_paid,  @urm_bal_due,  @urm_poss_dt, @urm_poss_cert_no,  
                                @urm_poss_type, @urm_grnd_rentupto_yr,   @urm_grnd_rent_paid, @urm_grnd_rent_bal, 
                                @urm_pln_submitted,   @urm_pln_subm_org_dt, @urm_pln_subm_org_no, @urm_pln_subm_rem , 
                                @urm_pln_sanctioned,  @urm_pln_sanc_org_dt, @urm_pln_sanc_no, @urm_pln_sanc_rem , 
                                @urm_pln_sanc_rev_dt, @urm_pln_sanc_rev_no, @urm_const_status, @urm_const_storeys,  
                                @urm_pln_storeys, @urm_comp_storeys, @urm_const_rem, @urm_comm_util,  
                                @urm_comm_util_other, @urm_pub_util, @urm_pub_util_other, @urm_ind_util1,  
                                @urm_plot_lease_ownby, @urm_prev_alloted, @urm_whose_fav, @urm_tenyr_exp,  
                                @urm_tenyr_org_dt, @urm_tenyr_org_no, @urm_tenyr_rev_dt, @urm_tenyr_rev_no,  
                                @urm_tenyr_rem, @urm_cc_rem ) 
    End 
    SELECT @urm_id=SCOPE_IDENTITY() 
    And the c# from i  send the data to the store procedure .. and it throws me the problem ..
    Server Error in '/LandMangement' Application.
    SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
    Description: An
    unhandled exception occurred during the execution of the current web
    request. Please review the stack trace for more information about the
    error and where it originated in the code.
    Exception Details: System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
    Source Error:
    Line 134: strLastError = ex.Message;
    Line 135: else
    Line 136: throw ex;
    Line 137: }
    Line 138:
    Source File: e:\LandMangement\App_Code\DAL\DBAccess.cs    Line: 136
    Stack Trace:
    [SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.]
    SechBhaban.DAL.DBAccess.ExecuteNonQuery(String commandtext) in e:\LandMangement\App_Code\DAL\DBAccess.cs:136
    SechBhaban.BOL.ResiMaster.Insert(String sector, String block, String plot, DateTime urm_entry_dt, String urm_loc_adv, String urm_alott_catg, Int32 urm_grnd_rent, String urm_grnd_rent_pp, String urm_grnd_rent_desc, String urm_resi, String urm_shop_allowed, String urm_yes_resi, String urm_non_resi, String urm_allot_no, DateTime urm_allot_dt, String urm_prev_alloted, String urm_whose_fav, DateTime urm_reg_dt, DateTime urm_exe_dt, String urm_coop_name, String urm_coop_reg_no, Int32 urm_org_cost, Int32 urm_interest_paid, Int32 urm_bp_cost, Int32 urm_amount_paid, Int32 urm_bal_due, DateTime urm_poss_dt, String urm_poss_cert_no, String urm_poss_type, Int32 urm_grnd_rentupto_yr, Int32 urm_grnd_rent_paid, Int32 urm_grnd_rent_bal, String urm_pln_submitted, DateTime urm_pln_subm_org_dt, String urm_pln_subm_org_no, String urm_pln_subm_rem, String urm_pln_sanctioned, DateTime urm_pln_sanc_org_dt, String urm_pln_sanc_no, DateTime urm_pln_sanc_rev_dt, String urm_pln_sanc_rev_no, String urm_pln_sanc_rem, String urm_tenyr_exp, DateTime urm_tenyr_org_dt, String urm_tenyr_org_no, DateTime urm_tenyr_rev_dt, String urm_tenyr_rev_no, String urm_tenyr_rem, String urm_pln_storeys, String urm_const_status, String urm_comp_storeys, String urm_const_storeys, String urm_const_rem, String urm_cc_rem, String urm_comm_util, String urm_comm_util_other, String urm_pub_util, String urm_pub_util_other, String urm_ind_util1, String urm_plot_lease_ownby) in e:\LandMangement\App_Code\BOL\ResiMaster.cs:128
    Residential.SaveResidentialbttn_Click(Object sender, EventArgs e) in e:\LandMangement\Residential.aspx.cs:104
    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
    protected void SaveResidentialbttn_Click(object sender, EventArgs e) 
            int retVal = 0; 
            //Insert 
            if (SaveResidentialbttn.Text == "Save") 
                String AllotDate = Request.Form["txtAllotDate"]; 
                retVal = ResiMaster.Insert(ddlSector.SelectedValue, txtBlock.Text, txtPlot.Text, DateTime.Parse(txtEntryDate.Text), 
                                             txtLocation.Text, txtCatagory.Text, Int32.Parse(txtGroundRent.Text), txtPerPeriod.Text, 
                                             txtGroundRentDesc.Text, ddlResi.SelectedValue, ddlShopAllowed.SelectedValue, ddlIfResdenditial.SelectedValue, 
                                             ddlIfNotResidential.SelectedValue, txtAllotmentNo.Text, Convert.ToDateTime(AllotDate), ddlPreviouslyAlloted.SelectedValue, 
                                             txtFavour.Text, DateTime.Parse(txtDateOfExecution.Text), DateTime.Parse(txtDateOfRegistration.Text), txtCoOptHousingSociaty.Text, 
                                             txtSociatyreg.Text, Convert.ToInt32(txtSalami.Text), Int32.Parse(txtInterestPaid.Text), Int32.Parse(txtBPValue.Text), 
                                             Int32.Parse(txtTotalValue.Text), Int32.Parse(txtBalenceDue.Text), DateTime.Parse(txtDateOfpossession.Text), txtCertificateNo.Text, 
                                             txtTypeOfPossession.Text, Int32.Parse(txtGroundRentPaidUpto.Text), Int32.Parse(txtGroundRentAmount.Text), Int32.Parse(TxtBalenceDueifAny.Text), 
                                             txtPlanSubmitted.Text, DateTime.Parse(txtOriginalDate.Text), txtNo.Text, txtRemarks.Text, 
                                             txtPlanSanctioned.Text, DateTime.Parse(txtDOSanctioned.Text), txtDOSanctionedNo.Text, DateTime.Parse(txtDORevisedSanction.Text), 
                                             txtDORevisedSanctionNo.Text, txtRemarksDORevised.Text, ddlTenYearsExpired.SelectedValue, DateTime.Parse(txtOriginalDate1.Text), 
                                             txttxtOriginalDate1.Text, Convert.ToDateTime(txtReviseddate1.Text), txtNoReviseddate1.Text, txtREmarksReviseddate1.Text, 
                                             txtStoreysPlanned.Text, urm_const_status.Text, txtNoofStorageComplete.Text, txtConstructionStroge.Text, 
                                             txtConstructionRemarks.Text, txtCGGrantedFloorwise.Text, ddlCommercialUtilisationDetails.SelectedValue, txtOtherUtilisation.Text, 
                                             ddlPublicUtilisationDetails.SelectedValue, txtOtherUtilisation1.Text, txtIndustrialutilisation.Text, ddlPlotLeaseOwnedBy.SelectedValue); 
                ResTableDataBind(); 
                ImageOk.Visible = true; 
                Msg.Text = "New Record Insert Sucessfully"; 
                ClearMain(); 
    //Insert Operation 
            public static int Insert( String sector,String block,String plot,DateTime urm_entry_dt, 
                                      String urm_loc_adv,String urm_alott_catg,Int32 urm_grnd_rent,String urm_grnd_rent_pp, 
                                      String urm_grnd_rent_desc,String urm_resi,String urm_shop_allowed,String urm_yes_resi, 
                                      String urm_non_resi,String urm_allot_no,DateTime urm_allot_dt,String urm_prev_alloted, 
                                      String urm_whose_fav,DateTime urm_reg_dt,DateTime urm_exe_dt,String urm_coop_name, 
                                      String urm_coop_reg_no,Int32 urm_org_cost,Int32 urm_interest_paid,Int32 urm_bp_cost, 
                                      Int32 urm_amount_paid,Int32 urm_bal_due,DateTime urm_poss_dt, String urm_poss_cert_no, 
                                      String urm_poss_type,Int32 urm_grnd_rentupto_yr,Int32 urm_grnd_rent_paid,Int32 urm_grnd_rent_bal, 
                                      String urm_pln_submitted,DateTime urm_pln_subm_org_dt,String urm_pln_subm_org_no,String urm_pln_subm_rem  , 
                                      String urm_pln_sanctioned,DateTime urm_pln_sanc_org_dt,String urm_pln_sanc_no, DateTime urm_pln_sanc_rev_dt, 
                                      String urm_pln_sanc_rev_no,String urm_pln_sanc_rem, String urm_tenyr_exp,DateTime urm_tenyr_org_dt, 
                                      String urm_tenyr_org_no,DateTime urm_tenyr_rev_dt, String urm_tenyr_rev_no, String urm_tenyr_rem,  
                                      String urm_pln_storeys,String urm_const_status,String urm_comp_storeys, String urm_const_storeys  ,  
                                      String urm_const_rem,String urm_cc_rem,String urm_comm_util,String urm_comm_util_other  ,  
                                      String urm_pub_util,String urm_pub_util_other,String urm_ind_util1,String urm_plot_lease_ownby) 
                DBAccess db = new DBAccess(); 
                SqlParameter objParam = new SqlParameter("@urm_id", 0); 
                objParam.Direction = ParameterDirection.Output;             
                db.Parameters.Add(new SqlParameter("@upm_sector", sector)); 
                db.Parameters.Add(new SqlParameter("@upm_block", block)); 
                db.Parameters.Add(new SqlParameter("@upm_plot", plot)); 
                db.Parameters.Add(new SqlParameter("@urm_entry_dt", urm_entry_dt)); 
                db.Parameters.Add(new SqlParameter("@urm_loc_adv", urm_loc_adv)); 
                db.Parameters.Add(new SqlParameter("@urm_alott_catg", urm_alott_catg)); 
                db.Parameters.Add(new SqlParameter("@urm_grnd_rent", urm_grnd_rent)); 
                db.Parameters.Add(new SqlParameter("@urm_grnd_rent_pp", urm_grnd_rent_pp)); 
                db.Parameters.Add(new SqlParameter("@urm_grnd_rent_desc", urm_grnd_rent_desc)); 
                db.Parameters.Add(new SqlParameter("@urm_resi", urm_resi)); 
                db.Parameters.Add(new SqlParameter("@urm_shop_allowed", urm_shop_allowed)); 
                db.Parameters.Add(new SqlParameter("@urm_non_resi", urm_non_resi)); 
                db.Parameters.Add(new SqlParameter("@urm_yes_resi", urm_yes_resi)); 
                db.Parameters.Add(new SqlParameter("@urm_allot_no", urm_allot_no)); 
                db.Parameters.Add(new SqlParameter("@urm_allot_dt", urm_allot_dt)); 
                db.Parameters.Add(new SqlParameter("@urm_reg_dt", urm_reg_dt)); 
                db.Parameters.Add(new SqlParameter("@urm_exe_dt", urm_exe_dt)); 
                db.Parameters.Add(new SqlParameter("@urm_coop_name", urm_coop_name)); 
                db.Parameters.Add(new SqlParameter("@urm_coop_reg_no", urm_coop_reg_no)); 
                db.Parameters.Add(new SqlParameter("@urm_org_cost", urm_org_cost)); 
                db.Parameters.Add(new SqlParameter("@urm_bp_cost", urm_bp_cost)); 
                db.Parameters.Add(new SqlParameter("@urm_interest_paid", urm_interest_paid)); 
                db.Parameters.Add(new SqlParameter("@urm_amount_paid", urm_amount_paid)); 
                db.Parameters.Add(new SqlParameter("@urm_bal_due", urm_bal_due)); 
                db.Parameters.Add(new SqlParameter("@urm_poss_dt", urm_poss_dt)); 
                db.Parameters.Add(new SqlParameter("@urm_poss_cert_no", urm_poss_cert_no)); 
                db.Parameters.Add(new SqlParameter("@urm_poss_type", urm_poss_type)); 
                db.Parameters.Add(new SqlParameter("@urm_grnd_rentupto_yr", urm_grnd_rentupto_yr)); 
                db.Parameters.Add(new SqlParameter("@urm_grnd_rent_paid", urm_grnd_rent_paid)); 
                db.Parameters.Add(new SqlParameter("@urm_grnd_rent_bal", urm_grnd_rent_bal)); 
                db.Parameters.Add(new SqlParameter("@urm_pln_submitted", urm_pln_submitted)); 
                db.Parameters.Add(new SqlParameter("@urm_pln_subm_org_dt", urm_pln_subm_org_dt)); 
                db.Parameters.Add(new SqlParameter("@urm_pln_subm_org_no", urm_pln_subm_org_no)); 
                db.Parameters.Add(new SqlParameter("@urm_pln_subm_rem", urm_pln_subm_rem));             
                db.Parameters.Add(new SqlParameter("@urm_pln_sanctioned", urm_pln_sanctioned)); 
                db.Parameters.Add(new SqlParameter("@urm_pln_sanc_org_dt", urm_pln_sanc_org_dt)); 
                db.Parameters.Add(new SqlParameter("@urm_pln_sanc_no", urm_pln_sanc_no)); 
                db.Parameters.Add(new SqlParameter("@urm_pln_sanc_rem", urm_pln_sanc_rem)); 
                db.Parameters.Add(new SqlParameter("@urm_pln_sanc_rev_dt", urm_pln_sanc_rev_dt)); 
                db.Parameters.Add(new SqlParameter("@urm_pln_sanc_rev_no", urm_pln_sanc_rev_no)); 
                db.Parameters.Add(new SqlParameter("@urm_const_status", urm_const_status)); 
                db.Parameters.Add(new SqlParameter("@urm_const_storeys", urm_const_storeys)); 
                db.Parameters.Add(new SqlParameter("@urm_pln_storeys", urm_pln_storeys)); 
                db.Parameters.Add(new SqlParameter("@urm_comp_storeys", urm_comp_storeys)); 
                db.Parameters.Add(new SqlParameter("@urm_const_rem", urm_const_rem)); 
                db.Parameters.Add(new SqlParameter("@urm_comm_util", urm_comm_util)); 
                db.Parameters.Add(new SqlParameter("@urm_comm_util_other", urm_comm_util_other)); 
                db.Parameters.Add(new SqlParameter("@urm_pub_util", urm_pub_util)); 
                db.Parameters.Add(new SqlParameter("@urm_pub_util_other", urm_pub_util_other)); 
                db.Parameters.Add(new SqlParameter("@urm_ind_util1", urm_ind_util1)); 
                db.Parameters.Add(new SqlParameter("@urm_plot_lease_ownby", urm_plot_lease_ownby)); 
                db.Parameters.Add(new SqlParameter("@urm_prev_alloted", urm_prev_alloted)); 
                db.Parameters.Add(new SqlParameter("@urm_whose_fav", urm_whose_fav));             
                db.Parameters.Add(new SqlParameter("@urm_tenyr_exp", urm_tenyr_exp)); 
                db.Parameters.Add(new SqlParameter("@urm_tenyr_org_dt", urm_tenyr_org_dt)); 
                db.Parameters.Add(new SqlParameter("@urm_tenyr_org_no", urm_tenyr_org_no)); 
                db.Parameters.Add(new SqlParameter("@urm_tenyr_rev_dt", urm_tenyr_rev_dt)); 
                db.Parameters.Add(new SqlParameter("@urm_tenyr_rev_no", urm_tenyr_rev_no)); 
                db.Parameters.Add(new SqlParameter("@urm_tenyr_rem", urm_tenyr_rem)); 
                db.Parameters.Add(new SqlParameter("@urm_cc_rem", urm_cc_rem)); 
                db.Parameters.Add(objParam); 
                int retval = db.ExecuteNonQuery("InsertResMasterNEW"); 
                if (retval == 1) 
                    return int.Parse(objParam.Value.ToString()); 
                else 
                    return -1; 
    Please help
    Thanks

    Hi, 
    I am having the samen problem as described by Gaurab. I get this
     error 'SqlDateTime overflow'. I have been looking for a few hours now online and can't find a solution.
    I am not an expert in ASP.NET but I have to fix this problem as it is a school assignment. 
    I am indeed trying to insert the data into my DB with this command:
    Cmd.Parameters.AddWithValue("@Birthday", subscribe.BIRTHDAY);
    The subscribe.BIRTHDAY part comes from my BO class, where I do this:
    public DateTime BIRTHDAY {
                get { return geboortedatum; }
                set { geboortedatum =
    value; }
    How can I check the DateTime variable i'm passing to the DB? How can I see in what format it is sending or how can I see what my DB expects it to be? 
    Many thanks
    - Nicolas

  • Getting ORA-01849 hours between 1 & 12

    Hi,
    Hi
    I have a table - audit with the following fields
    org_id number,
    grn_n number,
    ed_eff_m timestamp(6),
    data
    org_grp_i grn_n ed_eff_m
    3 1 07/21/2006 12:21:16 Am
    I want to update ed_eff_m with 07/21/2006 00:00:00
    for the above.
    But when i update the record the record, Iam getting the
    ORA-01849 hours between 1 & 12
    please suggest this update stmt is correct
    update audit ag
    set ed_eff_m= to_date(to_date('07/21/2006 00:00:00','mm/dd/yyyy hh:mi:ss')
    WHERE ag.ORG_GRP_I = 3
    AND ag.GRN_n =1
    Thanks in advance

    If all that is needed is to clear the hour part, you may try this too:
    UPDATE audit_grant_vesting_schedule ag
    SET ag.ed_eff_m = TRUNC(ag.ed_eff_m)
    WHERE ag.ORG_GRP_I = 3
    AND ag.GRN_n = 5633486;
    Hope this helps.

  • Crystal preview - A subscript must be between 1 and the size of the array..

    Hi
    I am getting the following error when I run Print Preview on the CR Sales Invoice:
    "A subscript must be between 1 and the size of the array ........."
    Any ideas?
    Thanks
    Ian

    Thanks Gordon
    However this is a fresh install and the default Crystal SI layout provided by SAP and I would have expected it to work.  It makes it seem like an installation problem.
    Do you know where the *.rpt files as stored by SAP and where I could maybe get a new Crystal SI to test?
    Thanks

  • Date must be between year 1 and year 9999 - error message

    I am receiving the following error message "Dates must be between year 1 and year 9999".  The highest value in the next date value in the DB is 12/31/9999.  The parameters being entered are 01/1900 and 12/9999.  The following formula is the cause of the error:
    EvaluateAfter ({@Start Date});
    Global DateVar EndDate;
           Global StringVar  strEndMonth:=Mid({?End Month/Year} ,1, 2) ;
           Global StringVar  strEndYear:=Mid({?End Month/Year} ,4, 4) ;
           Global NumberVar  nNextMonth:=CDbl (strEndMonth) + 1 ;
           Global StringVar  strEndDay:=ToText(Day(DateSerial (CDbl (strEndYear) , nNextMonth, 1-1) ) , 0) ;
           Global StringVar  strEndDate:=Right ("00" + strEndMonth, 2 ) + "/"Right ("00"strEndDay,2) +"/"  +strEndYear ;
           Global DateVar EndDate:=CDate(strEndDate) ;
    The bolded section is the section of the formula highlighted in Crystal.  I've determined if the user enters 11/9999 as the end date instead of 12/9999 the report runs fine.  Is this a problem with the formula or a limitation in Crystal or little of both?  I don't understand what the formula is doing but at the end of the year it looks like it counts forward to January and then back to December and obviously 9999 is the highest year possible so the attempt to go a month ahead tanks.  Is there a change I can make in the formula to avoid this error?

    The error lies in the formula.
    Global NumberVar nNextMonth:=CDbl (strEndMonth) + 1 ;
    When you enter 12/9999 it adds 1 to the month of 12 giving it 13.
    Global StringVar strEndDay:=ToText(Day(DateSerial (CDbl (strEndYear) , nNextMonth, 1-1)) , 0) ;
    This calculates the last day of the month.  Since from above the variable nNextMonth is 13, it tries to calculate 9999, 13, 1-1 which is invalid since there is no 13th month in any year.
    Make this change and it should work fine.
    Global DateVar EndDate;
    Global StringVar strEndMonth:=Mid({?End Month/Year} ,1, 2) ;
    Global StringVar strEndYear:=Mid({?End Month/Year} ,4, 4) ;
    Global NumberVar nNextMonth:=if CDbl (strEndMonth) = 12 then CDbl (strEndMonth) else CDbl (strEndMonth)+ 1 ;
    Global StringVar strEndDay:=ToText(Day(DateSerial (CDbl (strEndYear) , nNextMonth,
    if CDbl (strEndMonth) = 12 then 31 else 1-1)) , 0) ;
    Global StringVar strEndDate:=Right ("00" + strEndMonth, 2 ) + "/"+Right ("00"+strEndDay,2) +"/" +strEndYear ;
    Global DateVar EndDate:=CDate(strEndDate) ;
    Edited by: Sanjay Kodidine on Apr 7, 2009 11:19 AM

  • Frm-50004: day must be between 1 and last of month.

    frm-50004: day must be between 1 and last of month.
    hi dear all,
    I HAVE A TEXTITEM OF DATATYPE DATE. ITS FORMAT MASK IS 'HH24-MI-SS AM' BUT
    WHEN I TRY TO INSERT IT GIVES THE FOLLOWING ERROR:
    FRM-50004: Day must be between 1 and last of month.
    thanks
    Muhammad Nadeem
    Mardan (Pakistan)
    [email protected]

    I don't think you are getting that error message from that date item. Oracle defaults the month to current month, day to 01, and year to current year when they aren't entered in a date.
    However, you cannot use 'HH24' with the 'AM' meridian indicator, so that format mask is illegal, and SHOULD generate a different error message.
    And last, if you want Forms to carry the time in a date field, you MUST set the datatype to datetime.

  • Pick list date must be between order date and cancellation date

    Hi all
    A client gets this error:
    Pick list date must be between order date and cancellation date Message[173-89]
    The date is between that range.
    What else could be the reason for it.
    Thanks

    Hi
    Since the message you received is very user friendly - date must be between....
    I guess you have two situation
    1.Either operation is incorrect
    - Create a similar scenario in  your test environment
    -Are you receiving same error
    -Test with only one item so far
    -Check what is the result
    2 . You probably need to upgrade your patch level
       It might be coming from Application error
    Hope this helpls
    Bishal

Maybe you are looking for

  • Is graphic card upgrade on Satellite L300-21W possible?

    Hi! I`m thinking to buy Toshiba Satellite L300-21W but i wat to play some games on it like Cod2 but I think that her serial graphic card is weak so my question is: " CAN I REPLACE GRAPHIC CARD WITH BETTER ONE OR NOT( and with which one if you know)!?

  • Bold 9930 - dead and flashing red light

    Bold - Verizon 9930, died with flashing red light, non-responsive. Can connect wtih loader, re-loading latest OS for Verizon (7.1.0_rel1737_PL5.1.0.429_A7.1.0.580_Verizon_Wireless) Load fails with "application loader was unable to connect with your d

  • How do I force a Mac Pro Lion RAID 5 rebuild after replacing a failed drive?

    Hi, My Mac Pro RAID 5 (with Apple RAID controller card and RAID 5 volume with 3 hard disks) showed degraded RAID set message due to failed drive.  After I repalced the failed drive, I was unable to add it back to the RAID set.  So I tried to removed

  • Extractor technical name

    For LO extraction wat type of extractor we will use and give the technical name for that chandu

  • Debug Flash Player

    I am very new to Flex development and have had no luck trying to install the ActiveX flash player. I believe that I am supposed to use the one that was supplied with Flex Builder 3 found in <install location>/Player/win. From what I have garnered fro