Using default application date format substitution string

I'd like to reference something like ":app_default_date_format" to set date formats in sql statements.
Does a substitution string exist that returns the default application date format?
Thanks,
-Ken

Hello Ken,
>> I'd like to reference something like ":app_default_date_format" to set date formats in sql statements.
Isn’t the whole point of defining an application date format to avoid the need to specifically reference date formats?
>> Does a substitution string exist that returns the default application date format?
I’m not familiar with an official substitution string for the application date format but you can use wwv_flow.g_date_format .
Regards,
Arie.
♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
♦ Author of Oracle Application Express 3.2 – The Essentials and More

Similar Messages

  • Application Date Format in Interactive Reports

    Hi,
    What should we define in Number/Date Format in interactive reports column attributes such that it will use application level date format?
    Thanks

    Hi,
    You do not need define anything , then it use application date format
    Br,Jari

  • How can I dynamically change the Application Date Format?

    Hi everyone...
    In my application (v 3.2) I let the user set the application date format dynamically through a "preference" value they can change on the go.
    I then take the format they pick and assign their value (ie: DD-MON-YYYY) and pad 'HH:MI' to it and use this as the PICK_DATE_FORMAT_MASK which works great for most date pickers.
    The problem I have is that some date picker I use in the application don't require the HH:MI, they simply need the DD-MON-YYYY part. Could I use the NLS_DATE_FORMAT for this? Would I then be able to use date pickers with the "use application date format"? It doesn't seem to work for me.
    In other words, I basically need 2 date formats for my application date pickers; 1 for simply the dates and 1 for dates including time. And these 2 formats are chosen by the user by setting an application preference dynamically at run time.
    Not sure if I make sense here....any idea?
    Thanks!
    Francois

    "use application date format" is the choice you want.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Application Date Format 12-¿¿¿-2004

    Why date formats are not interpreted correctly ?
    Apex 3.2 , ORA XE, Win XP 32 SP2,
    When opening particular application:
    Home>Application Builder>Application 31517>Shared Components>Edit Globalization Attributes
    Application Date Format ( List of Values )
    The window appears with:
    12-¿¿¿-04
    12-¿¿¿-2004
    12-¿¿¿
    04-¿¿¿-12
    2004-01-12
    ¿¿¿¿¿¿¿¿¿¿, 12 ¿¿¿¿¿¿¿, 2004
    12-¿¿¿-2004 14:30
    12-¿¿¿-2004 14:30:00
    12-¿¿¿-2004 02:30PM
    16 hours ago
    Row(s) 1 - 11
    I have tried with changeing some parameters, reinstall XE DB and APEX,
    but without success on date format.
    Any help to fix date format ?

    Client configuration is the main factor for date formats, settings can be made in the database server for defaults but can be overridden according to the client. And check the browser language (and font) settings they can also be a factor.
    Start with checking the national language settings ( sqlplus > show parameter nls;) and did you install the Western European, or Universal version? (Windows? Linux?)
    Client settings are picked up from environment variables, the most important is NLS_LANG specifying client country, region, and character set so that the right characters are shown to the client (i.e. which currency symbol, number formats: 9,999.00 or 9.999,00) and in the U.S, we write dates as mm/dd/yy, while in the UK and most of Europe its dd/mm/yy. And the environment settings can be overridden within a session too, i.e. in sqlplus:
    select sysdate from dual;
    alter session set nls_date_format = 'yyyy-mm-dd hh24:mi:ss';
    select sysdate from dual;
    And check the NLS_LANG setting ...
    \[linux\]$ echo $NLS_LANG
    \[win\]$ echo %NLS_LANG%
    The character set for the database can cause trouble especially when the client settings are incorrect or invalid. Easiest way to find the db setting is SQL> alter database backup controlfile to trace; and check the trace file created in the user_dump_dest folder ...

  • How to get Default (System) Date Format Pattern?

    How to get system default date format which is defined in Regional Setting of Control Panel.
    We can get an instance of DateFromat using DateFormat.getDateInstance(DateFormat.SHORT) but problem is that there is no toPattern() exist in class DateFormat.
    However toPattern() exist in class SimpleDateFormat but there is no costructor like SimpleDateFormat(DateFormat)
    So please advise me, how can I get system short date format pattern?
    Thanks
    GAJESH TRIPATHI

    I reterieve the system date format but not which is currently defined in regional setting of control panel but it returns the format which is installed by default when windows(os) is installed.
    Edited by: gajesh on ? ????????, ???? ??:?? ?????????
    Thanks to provide me solution. My source code related problem is solved but still I am not getting format which is defined in control panel. but By Letting that it is not possible in Java,... I am doing my next work...so CLOSE THIS TOPIC Thanks'n Bye.

  • What is the use of inverted date format

    In table TCURR - Exchange rates, the field GDATU - Date As of Which the Exchange Rate Is Effective is stored as an inverted date. So 01/01/2008 is actually stored as 79919898.
    What is the use of inverted dates. Why does SAP use them. Why not just use normal date format? If I want the latest record from the table, instead of sorting by descending, I actually have to sort by ascending because the date is stored in inverted format.

    Hi,
    Inverted date is a old concept which helps in soring the dates sometimes. but now ASCENDING and DESCENDING sorting is more easy and quick. Check this application help. maybe useful for you
    1. CONVERT DATE f1 INTO INVERTED-DATE f2.
    2. CONVERT INVERTED-DATE f1 INTO DATE f2.
    Effect
    Calculates the nine's complement of the internal date format (YYYYMMDD - for more information about internal display, meaning and initial values of types, see TYPES) and places it in the field f2. For example, 19950511 becomes 80049488 and 80049488 becomes 19950511.
    In the inverse date format, the most recent date has the numerically smallest value. You can make use of this effect when sorting dates.
    Note
    The technique of manipulating the sort sequence of dates by inverting the internal date format is now rarely used. You can sort internal tables in order of ascending or descending date values much more efficiently using the ... ASCENDING or ... DESCENDING additions to the SORT statement.
    Example
    DATA DATE_INV LIKE SY-DATUM.
    CONVERT DATE SY-DATUM INTO INVERTED-DATE DATE_INV.
    Suppose, for example, SY-DATUM contains the date 11.05.1995 in its internal format 19950511. After execution of the CONVERT statement, DATE_INV would contain the internal format 80049488.
    //Kothand

  • How to Sort JTable data using Multiple fields (Date, time and string)

    I have to fill the JTable data with some date, time and string values. for example my table data looks like this:
    "1998/12/14","15:14:38","Unicorn1","row1"
    "1998/12/14","15:14:39","Unicorn2","row2"
    "1998/12/14","15:14:40","Unicorn4","row3"
    "1998/12/17","12:14:12","Unicorn4","row6"
    Now the Sorted Table should be in the following way:
    "1998/12/17","12:14:12","Unicorn4","row6"
    "1998/12/14","15:14:40","Unicorn4","row3"
    "1998/12/14","15:14:39","Unicorn2","row2"
    "1998/12/14","15:14:38","Unicorn1","row1"
    ie First Date field should be sorted, if 2 date fields are same then sort based on time. if date and time fields are same then need to be sorted on String field.
    So if any one worked on this please throw some light on how to proceed. I know how to sort based on single column.
    But now i need to sort on multiple columns.So what is code change in the Comparater class.
    Thanks in advance.. This is urgent....

    I think your Schedule objects should implement Comparable. Then you can sort your linked list using the Collections.sort() method without passing in a Comparator.class Schedule(Date date, String class) implements Comparable
      public void compareTo(Object obj)
        Schedule other = (Schedule)obj;
        return date.getTime() - other.getDate().getTime();
    }

  • What does initial do when used on a date format field

    Hi,
    When  a check of if initial is done on a date format field , does it check if the field is 00/00/0000 orit checks if its blank?
    Thanks.

    Check is done on value "00000000".
    Please try the following code, put a break-point on IF condition, t_date will have value  "00000000":
    DATA: t_date type sy-datum..
    IF t_date IS INITIAL.
      Write : 'test'.
    ENDIF.
    Hope this helps.

  • Date format interfering with interactive report

    My APEX version is 3.1.1.00.09.
    I'm using a method described elsewhere to change the global date format of my application. I have application items for a start and end date. I have two application processes, one for On Load: Before Header, the other for On Submit: After Page Submission - Before Computations and Validations. They both do:
    DBMS_SESSION.SET_NLS(param => 'NLS_DATE_FORMAT', value => '''fmMM/DD/fmYY''')
    Okay, all is well with that, my dates seem to stay the way I want them to. Since our upgrade I'm going through each section of my application and updating as necessary, and I particularly want to use the interactive reports. They work fine when the page is loaded, but if I change any options on the interactive report and submit it, I get an "ORA-01843: not a valid month" error. If I refresh the page, everything works as it should.
    What can I do to get around this, or do I have something wrong with my method that is causing this to happen?
    Chris

    Hi Chris,
    I tried to replicate this, but could not. Now granted, I tried this using the new "modern" method of controlling the default application date format via the new application Globalization attribute "Application Date Format". I set the Application Date Format to fmMM/DD/fmYY and my IR on EMP worked just fine.
    If you can replicate this on apex.oracle.com (using Application Date Format), I'd be happy to take a look at it.
    Joel

  • Column in DATE format

    Hello Everybody
    I have a report did Apex, this report has a column which data type is DATE but by default the Apex put it in the format : DD-MM-YYYY HH:MI:SS
    But I only want that his column has the format DD/MM/YYYY
    I know that is posible convert this field using the function TO_CHAR(date, format) but in the report I want to sort this field considering that this filed is in date data type not in char.
    Also I know that I can use the function EXTRACT for concatening the day, month and year and after convert to date in the format 'dd/mm/yyyy'; but I don´t want to write many code.
    I don't want to do some like this:
    TO_DATE(
    EXTRACT( 'DAY' FROM DateFiled )||'/'|| EXTRACT( 'MONTH' FROM DateFiled )||'/'|| EXTRACT( 'YEAR' FROM DateFiled ), 'DD/MM/YYYY' )
    Do you know how to convert to this date format (DD/MM/YYYY) preserving the format?
    I expect your prompt reply.
    Any help will be very appreciated.
    Best Regards

    Hi Eric
    One of the really cool features of the later versions of APEX is the ability to set a default "Application Date Format".
    This is done in the Application xx>Shared Components>Definition then select the "Globalization" tab.
    You can select from a list of pre-defined date formats, or enter your own.
    My preference is "DD-Mon-YYYY" which is not in the list.
    Just leave your date fields as regular DATE type in the select (no formatting in the select).
    This Application Date Format is then used as the default for ALL dates for which you don't specifically set (another) date format
    This is also selecable in the Display options of a "Date Picker (Use Application Date Format)" LOV - for any date page items that you want to provide a date picker.
    This really simplifies the effort in getting a consistent look and feel - and keeping a constant standard throughout the application.
    The other benefit is that you can make a change in one place, and ALL the dates (without a specific date format specification) will change format - just like that.
    This is just one of the features that makes APEX the most productive - and cool - systems around.
    Enjoy!
    Mike

  • Interactive Report - Date Format

    Hi,
    I created an interaticve report, in which one of the column is date picker data type. However, it's not showing the hour and minutes even though I chose the "DD-MON-YYYY HH:MIPM" format mask.
    Does any one know why this it? Thank you very much for the help!

    Hi Chris,
    I tried to replicate this, but could not. Now granted, I tried this using the new "modern" method of controlling the default application date format via the new application Globalization attribute "Application Date Format". I set the Application Date Format to fmMM/DD/fmYY and my IR on EMP worked just fine.
    If you can replicate this on apex.oracle.com (using Application Date Format), I'd be happy to take a look at it.
    Joel

  • How to convert any date format to default US format using javascript???

    Hi,
    I was trying to convert a date format to default US date format. The date format will vary according to different regions (It can be dd/MM/yyyy or MM/dd/yyyy or yyyy/dd/MM or any). I need to convert it in to MM/dd/yyyy always (US Format). Please give some
    solutions for the same.
    Warm Regards,
    Tony Joy

    hi
    it is not trivial task in common case. We faced with similar issue when tried to localize date times in display templates in Sharepoint 2013 depending on site's locale, which can be done only via javascript. In order to do it you need to add date time locale
    information from server side to client side, e.g. by defining global variable. See the following article for details:
    Localize datetimes in display templates in Content by search web parts in Sharepoint 2013. I extended OTB global object _spPageContextInfo with new property (as far as I remember this object is also available in Sharepoint 2010):
    <script type="text/javascript">
    jQuery(function() {
    if (typeof (_spPageContextInfo) != "undefined" &&
    _spPageContextInfo != null) {
    <%
    var ci = new CultureInfo(1033);
    var cultureSerialized = new JavaScriptSerializer().Serialize(
    new
    name = ci.Name,
    dateTimeFormat = ci.DateTimeFormat,
    numberFormat = ci.NumberFormat
    %>
    _spPageContextInfo.currentCultureSerialized = <%= cultureSerialized %>;
    </script>
    Having different date time formats for your locale, you may use
    Date.localeFormat function from MS Ajax for formatting the date in specific format. If in your case format is predefined you may hardcode it without adding DateTime formats from server side.
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

  • BC4J Query by example for dates uses wrong date format

    When querying by example on date fields, I get the following nested exceptions:
    oracle.jbo.SQLStmtException: JBO-27121: SQL error during statement execution.
    JBO-26044: Error while getting estimated row count for view object
    and
    java.sql.SQLException: ORA-01830: date format picture ends before converting entire input string.
    It would seem to be caused by the following clause added to the end of the entity object's query:
    "QRSLT WHERE ( ( (DATE_FIELD = TO_DATE('23/12/2003', 'yyyy-mm-dd')) ) )"
    which causes problems as our entity objects use a 'dd/MM/yyyy' date format.
    Is there a way we can make the query by example use the same date format as the rest of our app?

    I‘m not an expert on this but I see nobody is replying so this might help you. I've been having problems with dates as well and I‘m pretty sure that the attached formatter isn't used in find mode. That is because the java date class (can't remember which one) used by the BC4J has the format yyyy-mm-dd. I don't now if it is possible to change it but I got around the problem by writing my own domain. You can take a look at Toystore demo, by Steve Muench, that uses a custom date domain, ExpirationDate (see the code below). It is mapped to a VARCHAR column in the database but it is possible to map it to a DATE column.
    I have been watching the postings with questions about dates and I have noticed that a lot of people have problems with this but I haven’t seen an answer yet.
    package toystore.model.datatypes.common;
    import java.io.Serializable;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    import java.util.Date;
    import oracle.jbo.Transaction;
    import oracle.jbo.domain.DataCreationException;
    import oracle.jbo.domain.DomainInterface;
    import oracle.jbo.domain.DomainOwnerInterface;
    // --- File generated by Oracle Business Components for Java.
    * This custom datatype implements an immutable domain class that
    * maps to a VARCHAR column containing values like '10/2004' representing
    * expiration dates of credit cards. We could have chosen to implement
    * this as a domain that stores itself in a DATE column instead of a
    * VARCHAR column, but since the Java Pet Store demo schema stored the
    * information in a VARCHAR column, we decided to illustrate how to
    * accommodate that case using domains.
    public class ExpirationDate implements DomainInterface, Serializable {
    private Date mDate;
    private String mDateAsString;
    protected ExpirationDate() {
    mDate = new Date();
    convertDateToStringFormat();
    * Return the value of the expiration date as a java.util.Date
    public Date getDateValue() {
    return mDate;
    * Allow expiration date to be constructed from two
    * strings representing month and year
    public ExpirationDate(String monthVal, String yearVal) {
    this(monthVal+'/'+yearVal);
    public ExpirationDate(String val) {
    validate(val);
    convertDateToStringFormat();
    * The getData() method must return the type of object that JDBC will
    * see for storage in the database. Since we want this ExpirationDate
    * datatype to map to a VARCHAR column in the database, we return the
    * string format of the date
    public Object getData() {
    return mDateAsString;
    * <b>Internal:</b> <em>Applications should not use this method.</em>
    public void setContext(DomainOwnerInterface owner, Transaction trans, Object obj) {
    * Performs basic validation on strings that represent expiration dates
    * in the format of MM/YYYY. Note that in the process of testing whether
    * the string represents a valid month and year, we end up setting
    * the private member variable mDate with the date value, so if the
    * validate() method does not throw an exception, the mDate will be setup.
    protected void validate(String val) {
    if (val != null) {
    if (val.length() != 7 ||
    val.charAt(2) != '/' ||
    !isAllDigitsExceptSlashAtPositionTwo(val) ||
    !isValidMonthAndYear(val)) {
    throw new DataCreationException(ErrorMessages.class,
    ErrorMessages.INVALID_EXPRDATE,
    null,null);
    * Returns true if all digits except position 2 (zero-based) are digits
    private boolean isAllDigitsExceptSlashAtPositionTwo(String val) {
    for (int z=0, max = val.length(); z < max; z++) {
    if (z != 2 && !Character.isDigit(val.charAt(z))) {
    return false;
    return true;
    * Returns true if the val string, assumed to be in "MM/YYYY" format
    * is a valid month and year value, setting the mDate member variable
    * if they are valid.
    private boolean isValidMonthAndYear(String val) {
    try {
    int month = Integer.parseInt(val.substring(0,2));
    int year = Integer.parseInt(val.substring(3));
    Calendar c = Calendar.getInstance();
    c.setLenient(false);
    c.set(year,month-1,1); // Month is zero-based !
    mDate = c.getTime();
    catch (IllegalArgumentException i) {
    return false;
    return true;
    public String toString() {
    return mDateAsString;
    * Convert mDate to String format
    private void convertDateToStringFormat() {
    if (mDate != null) {
    SimpleDateFormat sdf = new SimpleDateFormat("MM/yyyy");
    mDateAsString = sdf.format(mDate);
    * Return true if the expiration date is in the future
    public boolean isFutureDate() {
    return mDate.compareTo(new Date())> 0;
    * Compare the Expiration Dates by comparing their respective
    * getData() values
    public boolean equals(Object obj) {
    if (obj instanceof DomainInterface) {
    Object thisData = getData();
    if (thisData != null) {
    return thisData.equals(((DomainInterface)obj).getData());
    return ((DomainInterface)obj).getData() == null;
    return false;

  • Date formats for SQL statements used by recordset object

    Hi,
    Date formatting appears to be quite problematic for Business One.  I did a forum search for date issues and I don't think I saw any of them with an "answered" status.  I have an issue with formatting a date for the creation of an SQL statement that the DI sends to SQL Server 2005.  I need to format a date so that the localization parameters don't matter for either the client machine or SQL Server's machine.  We don't have a problem as long as our machines are localized as USA.
    I have PL 22 and I have a form - ours - where I use the Today() function to fill a date field.  So this is a date that is not entered by the user.  The result of this function is consistent with the localization parameters on my machine.  We have two other date fields on the form where the user must type in the date. 
    As a test, I changed my machine to the UK parameters.  I then set up the language parameters of Business One for English(United Kingdom).  I changed the date format specifications in Business One so that its format is dd/mm/yy.  I then brought up the form and the field that is formatted by the above function arrived in the form's field as dd/mm/yy.  I then typed in the two other dates in the same format and added the record to the database.  The form's table is user-defined. 
    I dismissed the form then brought it back up loaded with the new record.  The date that was entered by the function appeared in USA format (mm/dd/yy).  The dates that were typed in appeared in the Business One format (dd/mm/yy).  This of course is not consistent.
    When I looked at what got into the database, the formats were the opposite.  Weird!  To make matters really confusing, I run an SQL statement within SQL Server Mgt Studio, and use the WHERE clause to filter on the date that was based on the function.  It didn’t matter what format I used for the WHERE clause, the record came up.  Does anyone have any idea about how I can ensure that I always use the correct date format for SQL statements passed by Business One to SQL Server regardless of where in the world the application is being run?
    Thanks,
    Mike

    Ian,
    Here's what I'm concerned about:  I’m using the date in a “WHERE” clause.
    Assume the date is Aug 3, 2007.
    "SELECT * FROM Table WHERE StartDate > ‘8/3/2007’"
    OR
    "SELECT * FROM Table WHERE StartDate > ‘3/8/2007’"
    If the client machine is set up as USA, the today function will provide the date as formatted in the first query.  If the database server is setup as let’s say the UK, I believe that SQL Server query parser will interpret the date as Mar 8, 2007.
    If the client machine is set up as UK, the today function will provide the date as formatted in the second query.  If the database server is setup as let’s say USA, I believe that SQL Server query parser will also interpret the date as Mar 8, 2007.
    In both cases it would be wrong.
    I know I could use the DATEPART function to get the three parts and this will make the code indifferent to the localization specs of the client machine.  I need to then be able to concatenate those date parts for the “WHERE” clause so that the localization specifications of the database server don’t matter.
    Thanks,
    Mike

  • Date format in planning application

    Hi,
    By default, the date format of a planning application is MM-DD-YY. In my application I change it to DD-MM-YY. But till now, when I am trying to enter a date in a data form of this application, also the date format is MM-DD-YY.
    I want to change the date format. Can you please help me?
    Thanks,
    Arijit

    Thanks KP for your reply but it didn't work.
    I had logged into the workspace with the id with which the application was created. Then I changed the date format redeployed it and restarted the services yet in the form where I am trying to enter the date in the desired format its not allowing me to do so and the default date format is being displayed...
    Can you please suggest where I am exactly going wrong?

Maybe you are looking for

  • How do I turn my MacBook Pro with retina display into a gaming computer

    How can I increase my MacBooks graphic handling so that I can game better on it? I want to be able to play like battlefield 4 at maximum graphic capability. I have on my macbook now: Configuration 2.8GHz Dual-core Intel Core i7 16GB 1600MHz DDR3L SDR

  • Safari doesn't display pdf file from within Dropbox

    When I click on a link on a web page that takes me to a pdf file located in a shared Dropbox folder, Safari only gives me a solid black page and doesn't open the pdf file.  All the other browsers do, Chrome, Firefox and even IE.  How can I fix this? 

  • SQL Query problem (PL/SQL function returning SQl query)

    I am using 3.1.2 Apex. When I create the region source with the following code. DECLARE l_sql VARCHAR2(32767); X1 VARCHAR2(9); X2 VARCHAR2(9); X3 VARCHAR2(9); X4 VARCHAR2(9); X5 VARCHAR2(9); X6 VARCHAR2(9); X7 VARCHAR2(9); X8 VARCHAR2(9); BEGIN SELEC

  • Oracle Database Required for Install???

    I am doing just some general testing of the 9iAS and Portal server products. I would like to try and build a few test portlets with Java and URL based. Is a database install of Oracle 9i required to properly work with Portal? Can I install Oracle 9i

  • Compress non-cumulative cube

    Hi Gurus! I'm working on a retail project. I've created an infocube based on 0RT_C36 to keep the stock movements. It is a non-cumulative cube. After the load of the initialization data (2lis_03_bx) the compression with the option "no marker update" u