Date and time
In the previous chapter, we already reviewed the Globalization support that APEX provides us with to deal with date and time. However, in a Right-To-Left environment, displaying adjacent date and time needs our special attention.
In Right-To-Left environment, certain dates and time formats are displayed from left-to-right, e.g. 10/03/2010 21:30:23. However, on a page, the Web browser sees two different elements the date and the time. While reversing the page orientation to Right-To-Left the Web browser will reverse the rendering order of these two elements and on the page we'll see 21:30:23 10/03/2010. To avoid this effect, we need to reverse the order of the date and time prior to it being reversed by the Right-To-Left orientation.
The following is an example of populating a Display as Text (does not save state) field with the database timestamp:
if :FSP_LANGUAGE_PREFERENCE = 'en' then return to_char(systimestamp,'MM-DD-YYYY HH24:MI:SS'); else return to_char(systimestamp,...