I know this is possible as I've seen this on multiple blogs in the Archive or Categories section:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG9Goqfy63zqGfxqDx8yj5ryypY5xeP_MN24ncyoPziGOayEwOGQ5-y-kIb0TJ56wgGzgzbh16acK7Wd0NKpNfncHXYCjZxAPaw-64k6zT0e3mvS5HuNLirJxoeK62RuB06qFhYM8_bo1L/s800/categories.png)
So instead of manually running an anonymous block to populate a table which I will then query, I decided to throw into Apex to make my life a little bit easier.
I create an application with a blank page and create my first item, P1_FROM_DATE. I decided to use a Date Picker (use item format mask):
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6aaPCGfs8AvzeJFxHFntTI3yHB1OP003mU58I7OidNAAPjv5hnesxguTNXtsPwPkYcmAGJ8gCPqaPfEQYCCjn0zsjSltATm_KgPQLcMVVouuql-9iLk7POCrsrDcf4iH5W_AES8wXdQ2g/s800/date_picker.png)
I then created an item, P1_DATE_FORMAT, with the YYYY-MM-DDTHH24:MI:SS set as the source. When I created the Data Picker, I was thinking there would be some place to select the item, but there wasn't. So I opted to enter the format in the Source section:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt09SHFkGZTu0BnsIkU-Mh6EaJaxvVtAZfKY_uL0ELdxLIWd8q3jAE6eK4XoLMOq0DAkDxNVYDFDa7EnhbZl3zp1YJf8_2Xvm2Wi8Uo8cemgCrmEwpHZUNjRiQO3ypETr2HVrW5zTlOFtk/s800/format_mask.png)
Then I ran the page and clicked on the little calendar icon, only to see this:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvaijkSwkWs5ZsB7F7kMLCAxRLwiCxXILZPe_RANkj_Qka0JDe_UhFm3-QMwtuXQTi5xM4bOjM3xgNdyZEB9zVWXk7_2d4NInW8bM-0hh196vT3qksQjYF4SGuGwAXfw_8-GcnuNCyiG4/s800/404.png)
Off to the Application Express forum and I read a few posts mentioning bad formats.
So I removed the "weird" YYYY-MM-DDTHH24:MI:SS format and voila!
That'll teach me to try something new when I'm rusty.
As a small aside, the date format, is the RFC 3339 format, according to the Google documentation.
4 comments:
Hi Chet,
when you get a 404 error it can help when you set the PlsqlErrorStyle mod_plsql parameter to get additional debugging information. In your case it would have shown you the actual error
ORA-01821: date format not recognized
See
http://www.inside-oracle-apex.com/oracle-apex-got-404-not-found-2/ for details.
Regards
Patrick
I'm not sure if it's possible or not (never having used APEX) but I think the format you're after is really: YYYY-MM-DD"T"HH24:MI:SS
ie:
select to_date('2009-08-05T10:21:00', 'YYYY-MM-DD"T"HH24:MI:SS') dt
from dual;
DT
-------------------
2009-08-05T10:21:00
Patrick,
Thanks for that tip. Since I only have admin privileges at home (11g) I don't have the (daily) opportunity to get in and check this stuff out. Plus, I am still trying to get a grasp on the PL/SQL gateway (EPG).
I'm hoping now that I'm using it more and more I'll be able to debug these things quicker, especially if I have you to help. :)
chet
@boneist (giggle),
I hadn't thought about that. Muchas Gracias. I'll give it a shot tonight.
Post a Comment