Showing posts with label DateFormat. Show all posts
Showing posts with label DateFormat. Show all posts

Friday, March 2, 2012

ADF 11g: Select date and time

Today, I had to enable the users to not only select a date, but also a time. I remember this being a lot of work in 10g, but in 11g, it's apparantly out of the box functionality.

Thanks to Shay Shmeltzer for providing a solution!

https://blogs.oracle.com/shay/entry/a_timehour_selector_in_adf_fac

In short:
  • Make field in database of type TIMESTAMP
  • Make sure it's also a TIMESTAMP in your entity object
  • Provide a date format mask that includes hours and minutes


More information can also be found in this forum thread.

Thursday, March 1, 2012

ADF 11g: Global date format

In ADF 11g, you can define a date format on many levels. On Entity Objects, View Objects, even on UI level in your JSF pages.

But wouldn't it be convenient to make 1 configuration and have all dates display the same? Well, this is possible. Just add this line of code to your trinidad-config.xml file (located in WEB-INF):


<formatting-locale>nl-BE</formatting-locale>


Of course, the locale you use determines the formatting. This particular example, nl-BE, will display all dates as dd/MM/yyyy.