Oracle Consulting Oracle Training Oracle Support Development
Oracle Books
SQL Server Books
IT Books
Job Interview Books
Rampant Horse Books
911 Series
Pedagogue Books

Oracle Software
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
SQL Server Books

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle


Privacy Policy




Oracle Tips by Burleson 


This is a user defined substitution string at the application level.  This is the best way to keep the dates consistent throughout an application.  The one caveat would be if the developer wants to use a combination of date only formats and date/time formats.  In that case, it would make sense to choose the format most often used and set the PICK_DATE_FORMAT_MASK accordingly.

Creating the PICK_DATE_FORMAT_MASK is done on the edit application attributes page described in a previous chapter.  For the information that follows, the following PICK_DATE_FORMAT_MASK was setup.

Using the PICK_DATE_FORMAT_MASK in report columns is as easy as using the substitution string for the Date Format attribute of a column.  See Figure 10.18 for an example.

Data in a web page is displayed as text and working with dates can be tricky at times.  Using the PICK_DATE_FORMAT_MASK, as shown in the next two examples, can make working with dates easier.

Formatting data while selecting it from the database can be performed by including the PICK_DATE_FORMAT_MASK in a TO_CHAR function as shown here:

TO_CHAR( order_timestamp, :PICK_DATE_FORMAT_MASK )

Updating data in a database column from a page item also requires a conversion for the text representation of a date to the date format the database column is expecting.  This can be done by using the PICK_DATE_FORMAT_MASK in a TO_DATE function as shown here:



Have you noticed in HTML DB that there are reports showing information such as “2 weeks ago,” “22 hours ago,” or “35 minutes ago?”  This is a date format known as SINCE.  Putting the string SINCE into the Date Format of a page item will cause the date to be formatted in this manner.  The ago time is rounded, but this is a simple way to provide this kind of date formatting.  Figure 10.19 shows the date format setting and a sample of what it produces.

The above book excerpt is from:

Easy HTML-DB Oracle Application Express

Create Dynamic Web Pages with OAE

ISBN 0-9761573-1-4   

Michael Cunningham & Kent Crotty


Download your Oracle scripts now:

The definitive Oracle Script collection for every Oracle professional DBA


Linux Oracle commands syntax poster

ION Oracle tuning software

Oracle data dictionary reference poster

Oracle Forum

BC Oracle consulting support training

BC remote Oracle DBA   



 Copyright © 1996 -2017 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation. SQL Server® is the registered trademark of Microsoft Corporation. 
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks