Date Picker (Application Format Mask) YYYY-MM-DD HH24:MI

I am experience what appears to be a bug with the Date Picker (Application Format Mask) that is causing the "DD" portion of the format mask to be interpreted as "CC" (when using a YYYY-MM-DD Application format).
Within "Application Builder", "Edit Attributes" I have defined a "Static Substitution Strings" with the required Substitution String of PICK_DATE_FORMAT_MASK and a Substitution Value of "YYYY-MM-DD HH24:MI" (without the quotes).
When this is used within the application, and I select a date of "January 15, 2008 @ 23:14", the date picker gives me a date of "2008-01-20 23:14". If I were to change the Year to 1957, the date I get is "1957-01-19 23:14". Note that if the century is 20, no matter what day of the month I pick, I get DD=20. If the century is 19, the day of the month is always 19.
I have also tested this with a format of YYYY-DDD HH24:MI. With this format too, the DDD gets set to the century portion of the year.
DD-MM-YYYY HH24:MI format does work, however this is not the format that my end users want to see. They want to see the format as "YYYY-MM-DD HH24:MI"
If I change the PICK_DATE_FORMAT_MASK to "YY-MM-DD HH24:MI" and pick "Feb 8, 1977" I get "77-02-28" and if I pick "January 9, 1921" I get "21-01-31" which just happens to be the last day of the month in each of those case.
So, something really weird is happen with the "Application Format Mask" Date Picker.
Please note, that because of a known bug (relating to the translation of the Browser Language of "en-ca" to the propery NL_LANG of ENGLISH_CANADA) refer to
HTMLDB - HOWTO Work with Dates
I am executing the following code in my first "On Load - Before Header" and my first "On Submit - After Computations and Validations"
EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_DATE_FORMAT=''YYYY-MM-DD HH24:MI''' ;
EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_SORT=''FRENCH''' ;
Could you please investigate this problem.

Paul,
Thank you for the feedback and detailed reporting of this issue.
This is a previously identified bug with the computation of the day component of the popup calendar.
This correction will be available with the next HTML DB patch set and/or the release of HTML DB available later this year.
Thanks again.
Joel

Similar Messages

  • Date column with format mask 'hh12:mi pm'

    let's say the user input record as shown below :
    trip At01 At02
    1 9:30 AM 12:30 PM
    At02 & At02 are date column with format mask 'hh12:mi pm'. When the user input 9:30 and tab to next item, the column will display as 09:30 AM. Then when user input 12:30 at AT02, it will display as 12:30 PM.
    Anyway, if I enter 1:00 at AT02, it will display as 01:00 AM. Actually I want to display as 01:00 PM. I still can go back to the field to edit it manually but is there a way that I can do as mentioned ?
    Please advise.
    Thanks,
    Shu Wen

    You are going to have to write your own validation logic to do this - You'll have to decide what point AM shoudl be defaulted and what point PM should be used. I don't think that there is a format mask that provides this functionality.

  • Apex mobile Date-Picker (date with time) format mask error

    Hi together.
    I'm playing  a little bit with Apex mobile.
    I want to save a date with hours and minutes in the database. So i have an date field (type: date with time).
    On my phone i can select an date value with time, but when i want to save the value, i get an format error, that the format 'YYYY-MM-DD"T"HH24:MI:SS' is wrong.
    I can't change the format mask in the element properties, because it is everytime going back to the old value "YYYY-MM-DD"T"HH24:MI:SS", when i save it.

    Not a 100% related, but personally and from a usability point-of-view I really dislike the built-in datetimepicker and so far every client who has seen it has agreed with it. It pops the date and time down to the bottom, it only selects when you hit close, it just doesn't look appealing as the normal datepicker does and you expect more. Personally I've also gone the route Jari described several times, and it's probably still the cleanest and least error-prone option. Validating dates can be quite a pain, but the datepicker built-in validation does that fine, so if you can circumvent validating a free-text time field that helps). I've used some jQuery timepicker plugins aswell, and they're ok, but still don't solve the validation (even though there is some javascript validation you still need serverside validation). All I'm trying to say is that using select lists for hour-minutes is not such a bad idea in my opinion.

  • How to change date picker display format?

    Default display format is 01-JAN-09 for date picker.
    How can I change it to
    Jan 21, 2009
    Thank you.

    If you need use your format for all data pickers in your application you can set it via:
    Go to
    Shared components ->Definition->Globalization (Tab) -> Application Date Format SET to Mon DD,YYYY
    and in the item Display as set "Data Picker (use ppplication format mask)"
    If you need set format to some data picker you have to go to your data picker item and Display as set "Data Picker (use item format mask)"
    and
    Go to Source region in this item and set Format mask field Mon DD,YYYY

  • Applying date and number format mask

    I have specified a date format for an attribute and a number format for another attribute of an entity object using Entity Object Editor - Control hints for the attributes.
    The date format is:
    Format type: Simple Date
    Format: dd.MM.yyyy
    The number format is:
    Format type: Currency
    Format: 0,000.00 km
    When using <c:out value="${bindings.MyDate}"></c:out> the format mask for the date is applied and it looks good, but when using
    <c:forEach var="Row" items="...">
    <c:out value="${Row.MyDate}"></c:out>
    </c:forEach>
    the format mask is not applied.
    When it comes to the number format it is not applied no matter what I use.
    I have tried setting the format for the view object attributes as well but the result is the same. How do I make this work?

    Can it have something to do with <html:form> ? Since it works using <c:out value="${bindings.MyDate}"></c:out> inside a html:form.

  • Outputted date with unusual format mask

    I am getting a flat file outputed from Fusion Financials SAAS, and one of the columns has this: 2013-11-14T15:10:36.000-06:00
    Clearly its a date. I am guessing its a datetime TIMESTAMP WITH TIME ZONE datatype. But, the Format Model is unfamiliar to me, particularly regarding the letter 'T'.
    Because its a flat file, this is coming to me as varchar2 data. I'd like to convert it to datetime.
    I got to this:
    select to_timestamp_tz('2013-11-14T15:10:36.000-06:00', 'YYYY-MM-DD HH24:MI:SS.FF TZH:TZM') AT LOCAL
    from dual
    It fails because of the letter 'T',
    I know I could do this:
    select to_timestamp_tz(REPLACE('2013-11-14T15:10:36.000-06:00','T',' '), 'YYYY-MM-DD HH24:MI:SS.FF TZH:TZM') AT LOCAL
    from dual
    And it works.
    But that is not the point. The point is to find the Format Model that Oracle is using here.
    Any thoughts on this?
    Thanks,
    Arie

    Arie, the timezone format in the file is based on ISO 8601: ISO 8601 - Wikipedia, the free encyclopedia
    This should work:
    SQL> select to_timestamp_tz('2013-11-14T15:10:36.000-06:00', 'YYYY-MM-DD"T"HH24:MI:SS.FF TZH:TZM') from dual;
    TO_TIMESTAMP_TZ('2013-11-14T15:10:36.000-06:00','YYYY-MM-DD"T"HH24:MI:SS.FF
    14-NOV-13 03.10.36.000000000 PM +06:00
    Hope this helps,
    Oliver
    Fusion Apps Developer Relations
    https://blogs.oracle.com/fadevrel

  • InfoPath Date Picker - Reversed formats for different users

    Two other users using an InfoPath 2010 form I have published onto SharePoint 2013 on an intranet both experience a mandatory date format of dd/mm/yyyy, whereas I experience mm/dd/yyyy. We are all using IE and have the same version (11.0.9600.17207) with
    the exception of one of the other users (10). Any solutions/possible causes of the problem?

    Hi Linna,
    Please collect information about regional setting in all PC machines’ control panel. InfoPath is client application that might be affected by local regional settings. Also provide the regional setting of your site.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Solved: Pick Number format mask

    Hello,
    I'm trying to format all my numbers to a specific model:
    999G999G999G999G990D00
    I tried doing it like I did with 'PICK_DATE_FORMAT_MASK', where I define my format under
    "Application Attributes>Definition". I called it PICK_NUMBER_FORMAT_MASK'.
    It didn't work and i got the next error above my report:
    report error:
    ORA-01481: invalid number format model
    I also tried to define an application item with the value: 999G999G999G999G990D00
    but then I get the same error. If I paste my number format in my report column under Number / Date Format then it works perfect. But I can't change the global format of my numbers now.
    Can anyone help me?
    Thanks in advance.
    Regards,
    Oli

    <p>Oli,</p>
    <p>As you already discovered there is no PICK_NUMBER_FORMAT_MASK substitution variable like there is for date pickers. Perhaps this a nice enhancement request. However, there are some workarounds:
    <ul><li>
    <p>For reports, you can use your PICK_NUMBER_FORMAT_MASK if you convert the NUMBER columns into VARCHAR2 columns like this:<BR>
    <p>to_char(number_column,'& PICK_NUMBER_FORMAT_MASK.')</p></li>
    <li><p>Use ApexLib and extend the firefox plugin with your own numeric settings.</p></li>
    <li><p>You can use the user interface defaults (table defaults, column defaults) in the shared components section of your application.</p></li>
    </ul>
    <p>With kind regards,</p>
    <p>Jornica</p>

  • Jquery Date Picker Validation - format issue

    Hi ,
    I am using 2 text items with Jquery dateicker for start date and end date items.
    I have to now write a JS validation to ensure start date <= end date.
    The dateformat of my items are 'd-M-yy' (02-Mar-2010) .....
    When I try to use the Date.parse() function , it gives me an invalid date error....
    If I change the date format to mm/dd/yy (03/02/2010) then there is no problem, I can use Date.parse() and compare the two dates, I get no error . However I need the date format to be : 02-Mar-2010
    Below is a simple version of the JS function Iam using to compare dates and alert error
    function f_validate()
    var a = $v('P1_START_DATE');
    var b = $v('P1_END_DATE');
    var startDate = new Date();
    var endDate = new Date();
    startDate = Date.parse(a);
    endDate = Date.parse(b);
    // if I alert() startDate or endDate it says invalid date
    if (startDate>endDate){
    alert('error');
    else
    doSubmit();
    } Has anybody done a similar validation with Jquery datepickers in the format 'd-M-yy' ?
    Also how Can I use $.datepicker.parseDate function within my Javascript function so that I can convert the dates to the default format and then compare them....
    Appreciate any ideas/pointers
    Thanks,
    Dippy
    Edited by: Dippy on Mar 2, 2010 12:42 AM

    I've used the following without problems:
       var gasDay = $v('P0_GAS_DAY');
       var gasDayDate = new Date();
       gasDayDate = $.datepicker.parseDate('dd-M-yy', gasDay,
          monthNamesShort : ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC']
       );

  • Date Picker Error when not valid date

    I have a field with a date picker. I have an inline validation of type pl/sql error that checks to see that the user actually entered a valid date
    l_date := todate(:P1_MYDATE, '&PICK_DATE_FORMAT_MASK.');
    Works fine, except, next to the field (between the field and the date picker) I get this "junk"
    Unable to cast value "03/35/2004" to date format mask PICK_DATE_USING_FLOW_FORMAT_MASK
    This is pretty ugly, especially as I am already telling them they made a mistake.
    Would you like me to log a bug?
    Also . . . it would be great to have a built in validation for dates. Any thoughts there? Perhaps an enhancement request?
    Thanks,
    a-

    Anton,
    This is definitely pretty ugly and should be handled more gracefully. As it stands now, there is no way to suppress this automatic casting to a date value.
    You can work around it by clearing session state for that item if the validation fails. You could do this in a validation of type Function Returning Boolean with:
    declare
    l_date date;
    begin
    l_date := to_date(:P1_MYDATE,'&PICK_DATE_FORMAT_MASTK.');
    return true;
    exception
    when others then
    :P1_MYDATE := NULL;
    return false;
    end;
    The idea for a built-in validation for dates is a great one. HTML DB has all the information (what type of date picker, any format masks, NLS settings) to determine the validity of a date value.
    Joel

  • How do you add a format to the "Date Picker Format Mask" available formats?

    Hi,
    When I select the Date Picker Format Mask or "Number / Date Format" they doen't have YYYYMMDD or others that may be desired...
    How do you add a format to the available formats?
    Thank you, Bill

    Bill - From the popup help text:
    If you need to create a Date Picker item, but the format you need does not appear in the Display As list, select Date Picker (use application format mask). When an application uses this type of date picker, the Application Express engine derives the date format from an item named PICK_DATE_FORMAT_MASK. You can populate this item in two ways:
    - By defining an application substitution string named PICK_DATE_FORMAT_MASK
    - By creating an application-level item named PICK_DATE_FORMAT_MASK
    See the doc for more details.
    Scott

  • Date Picker Format YYYYWW

    Hi,
    I need to make a calendar date picker return a date in
    YYYYWW format. I already tried to use an application format mask with no success. Any Ideas ?
    thanks in advance,
    pedro

    please feel free to tell us specifically what "no success" means for you. i'm able to have my datepickers return YYYYWW values w/o issues. if you're using your datepicker in an update form, though, know that your WW format code will cause problems there. when you use a datepicker item, it's doing a to_date on your value at one point. if that value contains a WW format date value in there you'll hit a ORA-01820. it's the same error you'd get if you did a select to_date('200426','YYYYWW') from dual. anyhow, datepickers using the application format mask, PICK_DATE_FORMAT_MASK, do support 'YYYYWW' format masks, but they won't work on update forms. i'll log an enhancement request for us to help with avoiding that issue for updates, but if your issue involves something else about using PICK_DATE_FORMAT_MASK, please do let us know.
    regards,
    raj

  • Date validation in "DD-MON-YYYY" Format,

    Hi ,
    I have created a textbox with date picker as (dd-mon-yyyy) .
    Now i want to create a validation on it for the format (dd-mon-yyyy) .
    I have created a pl/sql code with type "function returning error text".
    Begin
    If :P4_END_DATE IS NOT NULL THEN
    if :P4_END_DATE != to_date(:P4_END_DATE ,'DD-MON-YYYY') then
    return 'END DATE should be in "DD-MON-YYYY" Format';
    end if;
    END IF;
    End;
    When i type in like 20-NOV-08 it gives error as 'START DATE should be in "DD-MON-YYYY" Format',
    but when i change month like 20-11-2008 , it actually gives error
    ORA-01843: not a valid month
    Error ERR-1024 Unable to run "function body returning text" validation.

    Vaibss wrote:
    Hi ,
    I have created a textbox with date picker as (dd-mon-yyyy) .
    Now i want to create a validation on it for the format (dd-mon-yyyy) .
    I have created a pl/sql code with type "function returning error text".
    Begin
    If :P4_END_DATE IS NOT NULL THEN
    if :P4_END_DATE != to_date(:P4_END_DATE ,'DD-MON-YYYY') then
    return 'END DATE should be in "DD-MON-YYYY" Format';
    end if;
    END IF;
    End;
    When i type in like 20-NOV-08 it gives error as 'START DATE should be in "DD-MON-YYYY" Format',
    but when i change month like 20-11-2008 , it actually gives error
    ORA-01843: not a valid month
    Error ERR-1024 Unable to run "function body returning text" validation.The call to 'to_date' is raising an exception when it tries to convert your date, standard PL/SQL exception handling takes over and the rest of your code is ignored.
    You could try:
    declare
    pragma exception_init(invalid_date,-01830);
    l_dummy date;
    Begin
    If :P4_END_DATE IS NOT NULL THEN
    l_dummy := to_date(:P4_END_DATE ,'DD-MON-YYYY') then
    END IF;
    exception
    when invalid_date then
    return 'END DATE should be in "DD-MON-YYYY" Format';
    End;
    but even that will not check that the user actually used your desired format - the to_date can be quite flexible e.g. accepting separators other than the '-' that you have declared. In fact, the above would only catch the user entering a 'date' that is shorter than the format string - changing the 'invalid_date' for 'others' would capture more (all!) exceptions.
    You probably want to look at using regular expressions to perform the format validation.
    Edited by: Andy Hardy on Nov 25, 2008 12:29 PM

  • Date format Mask in Source Value Expression

    Hi there ,
    I am in situation where I will have to have a Formate Mask in the "Source" for the Page ITEM.
    Last refresh date for tables:  &P76_DATA_LOAD. I have the source as refered above. I want that &P76_DATA_LOAD. to have mm/dd/yyyy format mask . How do I do it ? ANy help will be highly appreciated.

    Hi,
    only a string that holds a data will have format masks.
    The way your date column shows up in your database is set up using nls_date_format parameter,
    If you want a string you can just use TO_CHAR(P76_DATA_LOAD,'mm/dd/yyyy')
    If you want your date column to be displayed as above then change the nls_date_format parameter.
    G.

  • Date format mask failure stops navigation

    I'm trying to allow users to enter dates in multiple formats.
    My date items already have format mask 'YYYY-MM-DD'.
    I have added ON-ERROR code that handles errors like FRM-50003 so that users can enter '29-APR-2011' and the error handler fills the date item with '2011-04-29'.
    However, when users enter '29-APR-2011', then tab out of the item, the format mask error stops navigation to the next item. The user needs to tab a second time to actually leave the item.
    There are no FORM_TRIGGER_FAILURE exceptions in my code that would stop navigation to the next item.
    How can I allow users to enter data in formats other than the one I've specified for my format mask, but not have to tab twice to exit the item?
    I know that I can add a KEY-NEXT-ITEM trigger like the following. Unfortunately, I would have to re-write much existing code.
    enter;
    next-item;
    I know that I could remove the format mask and let WHEN-VALIDATE-ITEM handle things. But then I have to add validation code to all my date items. I really just want to write one piece of code that is called from ON-ERROR so that I don't have to re-write all existing code.
    Suggestions?
    Thanks,
    -Ken
    Edited by: Ken Anderson on May 27, 2011 3:12 PM

    With FORMS_USER_DATE_FORMAT you can specify different allowed input masks without having code in your form. Heres some more info Re: Date field in 10g Form

Maybe you are looking for