Question : AJAX CalendarExtender - No dates before 1950

I have a website that accesses a database through a query that contains two dates (startdate, enddate). I am using the AJAX CalendarExtender. It works perfectly until I ask for any dates prior to 1950. Dates between 1950 and current return the correct results. Dates before 1950 return no results. However I can use TOAD and query the database and get the correct results using a similar SQL query and asking for dates before 1950. I am accessing an Oracle 10g database for the dates which presents other problems that I think I have fixed.

Answer : AJAX CalendarExtender - No dates before 1950

I found the answer to the problem. It seems that in my SQL query I was passing only the 2 digit year to Oracle. Oracle treats 2 digit dates below 50 as in another century. I had to add a default format to the SQL Query. The code change is below.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
SELECT FINANCE_GISASSETS.OBJECTID, FINANCE_GISASSETS.INSTALLFINANCIALPROJID,
      FINANCE_GISASSETS.INSTALLPLANSHEETID,FINANCE_GISASSETS.INSTALLDATE,
      FINANCE_GISASSETS.APPROXINSTALLDATE, FINANCE_GISASSETS.GISLINKID,
      FINANCE_GISASSETS.RETIREFINANCIALPROJID, FINANCE_GISASSETS.
      RETIREPLANSETID, FINANCE_GISASSETS.RETIREDATE, FINANCE_GISASSETS.
      DIAMETER, FINANCE_GISASSETS.MATERIAL, FINANCE_GISASSETS.OWNERSHIP,
      FINANCE_GISASSETS.COMMENTS, FINANCE_GISASSETS.LIFECYCLESTATE,
      FINANCE_GISASSETS.FEATURETYPE, FINANCE_GISASSETS.FINANCEACCOUNT,
      FINANCE_GISASSETS.FEATURELENGTH_FT, FINANCE_GISASSETS.FIELDWORK_ID,
      FINANCE_GISASSETS.CATEGORY, FINANCE_GISASSETS.NAME, FINANCE_GISASSETS.SITENAME
    FROM GISREFORMAT.FINANCE_GISASSETS
    WHERE (FINANCE_GISASSETS.INSTALLDATE BETWEEN TO_CHAR(:start_date, 'DD-MON-YYYY') AND TO_CHAR(:end_date, 'DD-MON-YYYY'))">
Random Solutions  
 
programming4us programming4us