Date format Mask for CHAR datatype

hi
i want to assign a format mask like 'dd/mm/yyyy' to a field which has char datatype can i ?

The quickest answer to your question is to try it! :-) If you click on the Format Mask property of your Text Item and then press F1 Forms will display the Format Mask Help information for this property. All of the valid combinations for a Text Field Format Mask will be displayed.
To answer your question, you can put a format mask on a Text Item that can enforce the basic format of 'DD/MM/YYYY', but you could get data like: 99/99/9999. You would have to write code in a When-Validate-Item trigger that would ensure the user has entered a valid date.
Hope this helps.
Craig...

Similar Messages

  • 50027: Invalid format mask for given datatype.

    hi ,
    i have a non database Number Item maximum length is 8
    when i try to put
    NNNNNNNN0.99 as a format mask
    i got the following error
    50027: Invalid format mask for given datatype.
    i want this field to view it's value Such as
    0.55when there is no integer no before the decimal point
    Can anyone help please?
    Form Ver Is Form6i
    Edited by: ayadsufyan on Apr 25, 2013 3:58 AM

    ayadsufyan wrote:
    hi ,
    i have a non database Number Item maximum length is 8
    when i try to put
    NNNNNNNN0.99 as a format mask
    i got the following error
    50027: Invalid format mask for given datatype.
    i want this field to view it's value Such as
    0.55when there is no integer no before the decimal point
    Can anyone help please?
    Form Ver Is Form6i
    Edited by: ayadsufyan on Apr 25, 2013 3:58 AMtry
    099999.99Hope this helps

  • Can you specify format mask for date or timestamp columns

    Hi,
    Recently when I'm developing a PL/SQL application, I find that any format mismatch between data in table and format mask specified in to_date/to_timestamp function will cause exceptions. However, I'd like to make my application more robust and immune to this kind of problems, and know exactly which format mask to use for exactly what columns in db table.
    Is there a way in a table column to specify the format mask for date/timestamp columns such that I can know exactly what format mask to use when doing conversion? Also I don't want to depend on NLS_DATE_FORMAT specification, don't want to make a long case statement to check for every date format allowed by Oracle.
    Many thanks.

    As per my knowledge it can't be possible
    casuse if you entered '12/11/2007' date
    how oracle know that in date 12'th is the month or 11'th.
    The person who entered that date will also have confusions in future.
    either you have to fix one date format for your whole application (application configuration).
    or you have to store the date format in other column of the table.
    In case you set the date column to varchar and store all the dates without format then
    in future you may face problems in future while fetching the records, searching etc.
    Regards
    Singh

  • JQuery format mask for date columns in tabular form

    Hi,
    How can I apply jQuery format mask for date columns in a tabular form?
    Thanks.
    Andy

    OK, I realized I didn't choose the default type as "Pl/SQL Expression", now it's working correctly.
    Thank you very much!

  • Need help with date format mask

    Hi there, right now I'm trying to set a default date format mask constraint for one of the attributes for my table. I want to set the default mask constraint as MM/DD/YY but I don't know how to. it should be something like:
    CREATE TABLE work (WorkDate DATE CHECK (WorkDate = 'MM/DD/YY'))
    or something like that, but I don't think that's correct. Can anyone help me? Thanks in advance.

    What you want (and should have done) is to read the documentation, starting with the concepts:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/datatype.htm#CNCPT413
    http://www.oracle.com/pls/db102/search?remark=quick_search&word=date&tab_id=&format=ranked
    A date is stored as, well, a date, format masks only come into play when you're selecting/retrieving a date or when you want to store a string as a date. Default date formats can be set through NLS_DATE_FORMAT at session and database level.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams122.htm#REFRN10119
    Documentation homes (from which you can do a simple quick search):
    http://www.oracle.com/pls/db102/homepage
    http://www.oracle.com/pls/db112/homepage
    Bottom line:
    Trying to set a default date format mask on a date datatype column makes no sense...

  • Problem with date format mask 'D'

    I am experiencing an extremely thorny problem with the date format mask ‘D’. I am trying to use it to check whether today is a Monday. The variable v_temp_day is set to sysdate. For the last 4 weeks the code has behaved erratically – giving a different result at 02:00 than at 10:30 even though it is only taking account of the date. In desperation I inserted a debug statement formatting the date in a variety of ways – with interesting results. Oracle is somehow managing to tell us that today is simultaneously Monday and Tuesday depending on which format mask you choose. Anyone got any thoughts or suggestions?
    PROC_ID TO_CHAR(STAMP_TIM
    EVENT_SQLERRM
    RRHKP010 17092007 02:00:00
    TO_NUMBER( TO_CHAR( v_temp_day, D ) ) = 2. TO_CHAR( v_temp_day, D ) = 2. TO_CHAR( v_temp_day, DY ) = MON. TO_CHAR( v_temp_day, DAY )
    = MONDAY . TO_CHAR( v_temp_day, Day DD-MON-YYYY HH24MISS ) = Monday 17-SEP-2007 020000. TO_CHAR( v_temp_day, D ) = 2.
    SQL> select to_char( sysdate, 'D' ) from dual ;
    T
    1

    My book says the trunc(d,'iw') will return "same day of the week as Jan 1st of that year"It's bad book.
    Please read about [url http://oraclesvca2.oracle.com/docs/cd/B10501_01/server.920/a96540/functions176a.htm#80159]TRUNC & 'IW' Format Model and [url http://oraclesvca2.oracle.com/docs/cd/B10501_01/server.920/a96529/ch3.htm#50331]Database Globalization Support Guide: First Calendar Week of the Year in the manual.

  • Error in SQL Date Format Mask

    Hi,
    I am facing problem in validation data in FDQM.
    When I am trying to validate data,I am getting an error as ' An Error occured.Please verify that SQL Date Format Mask is correct'
    The current Date Format in our application is YYYYMMDD.
    I did not have this problem earlier in validating data.This problem is occuring now only and also this error is coming for few entities only.
    Could any one suggest me on how this can be resolved.
    Thanks

    Hi Kelly,
    I checked periods in control tables and there are no duplicates.
    The Period Date Format Mask is MMM-YYYY where as the SQL Date Format Mask is YYYYMMDD.
    These settings are there since the time I created application.Has it got anything to do with database.
    Appreciate your quick response
    Regards,
    Mrudula

  • Convert Oracle date format masks to Java format masks

    Have an application based on Oracle that stores data in text form (for display) and in native date format. It is being migrated to another application with a Java based front end that can only use Java format masks to display the dates in the desired display format.
    Is there a way to translate the Oracle format masks to Java? I can do this in SQL or PL/SQL using the database or in Java.
    I really don't want to write detailed code to parse the masks, although if parsers are available to take an oracle mask into its metadata (minute, year, etc), it may be possible for me to write the code.
    This seems like something that must have been done many times over the years. I would prefer to reuse workable code rather than reinventing the wheel.
    To be clear, I do not need to alter data or convert dates shown in string form. Just the format masks so the new app will display dates in the same manner as the old app. Fortunately, both apps handle interpreting the format masks in their native technology, so it is just converting the format mask.

    kenmadsen wrote:
    Both applications have a varchar2 column and a date column. A date picker selects and returns the date in native format for storage and the application uses the mask to format the varchar2 column for display (and storage). The old application uses an Oracle date format mask DD-Mon-YYYY HH24:MI and the new application uses Java date masks (DD-MM-YYYY hh:mm). (I may not have the translation from HH24 to hh correct).
    The date column and the display column store the same information (a date), but one is stored natively and the other is displayed as the application administrator want the particular row to be formatted for display. (the mask is a column in the same table as the other 2 columns). Each row has characteristics (other columns) that determines what the data is and how it should be shown (some things need to show time; others only the date)
    So the problem is, when migrating, the new application cannot render the dates as the old app did because "Mon" is Oracle format, not Java format.
    No data is being converted in the migration, except for the mask itself. Both applications have the same record structure with respect to these columns and they both use the mask to generate the formatted varchar2 data for display in the application and storage.too bad you insist on try to describe with words rather than actual CODE.
    Please explain again why this is an Oracle problem & NOT a Java problem?
    Oracle RDBMS is a data repository & can't automagically change data content for you.

  • Help: Date Format Mask Issue year 0004 instead of 2004

    Hi,
    I set Date Format Mask as MM/DD/YYYY for a date field. However, when user enter
    12/31/04 the result turned out as 12/31/0004
    Of course, I'd like user put 12/31/2004, but 12/31/04 leads to 12/31/0004 has to be stopped.
    Any suggestions?
    Thank you in advance.
    Jimmy

    Thank you very much Francois and it works for me.
    Jimmy

  • Problem With Date Format Mask

    Hi everyone,
    when i set the date format mask in any field..
    if i enter any wrong date format messages are coming in to loop
    is this is bug of format mask?
    how can i avoid this..
    thanks in advance
    anand mohan

    It should not take you into a loop. If the "validation" against the format mask fails, a message is displayed, and the focus is returned to the field which caused the problem. Do you maybe have some method or event associated with the field which could be causing the circular behavior?
    -- Brian

  • How Can I Change Format Mask For All Fields that type's Number Depend on Parameter in Report Builder 10g ?

    I want Change format mask for all fields that type's number
    Such as
    if  :parameter_value = 1 then
       all fields format mask = ' 999,999,990.000' ;
    else
       all fields format mask = ' 999,999,990.00' ;
    end if;
    Regards

    So, i have bad news for you : you'll have to rebuild again.
    Meanwhile i have excellent news for you : there's an online tool made by Johannes Henseler called Sidecar xml which builds the necessary xml file for you, sort of what you find in the Digital Publishing Folio Editor website, but saves it in your Folio folder.
    Next time you import all your folder (with that file), it will place all the necessary information, and even reorder the articles.
    Build once, play many times.

  • DelimitedData and Date Format Mask

    I am using desformat=DelimitedData to generate a Report with Version6.
    Although the date Format Mask is DD-MON-RRRR the date in the report is 11-NOV-34. What can I do?
    Thanks in advance
    Yvonne

    Hi Pieter,
    This does looks like a Bug. Please contact Oracle Support to assist you in getting the right patch or otherwise.
    Regards
    Oracle Reports Team.

  • Date format mask in Enter-Query mode

    Hi,
    I'm developing a Form which is able to query the masterblock from a detail-item.
    The queryable detail-item is a date field and has a datatype: DATETIME. When a new record is entered the values in the date field are stored in the database like "18-10-2002 15:04:02"
    When the form is in enter_query mode the user must be able to enter 18-10-2002 (DD-MM-YYYY format mask, so without time mask). When execute the query with this date format the query is not able to find data.
    I used a Key-Execute-Query on the detailblock like this:
    SELECT 1.COLUMN
    , 2.COLUMN
    INTO :1.COLUMN
    , :2.COLUMN
    FROM TABLE.1
    , TABLE.2
    WHERE 1.COLUMN = 2.COLUMN
    AND TO_CHAR(1.COLUMN,'dd-mm-yyyy') = to_date(:avg.datum,'dd-mm-yyyy');
    Can anyone please help me?
    Regards,
    Ronny.

    Hi Ronny,
    I'm not sure to have got exactly your issue (especially why you have to use that select in master-detail query), but I suggest you to substitute
    ...AND TO_CHAR(1.COLUMN,'dd-mm-yyyy') = to_date(:avg.datum,'dd-mm-yyyy');
    with
    ...TRUNC(1.COLUMN) = TO_DATE(:avg.datum,'dd-mm-yyyy');
    To be fair, I would use it in the where clause, even if you set it dinamically.
    Let us know,
    Marco

  • 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 On Unbound Item

    Hello everyone!
    I have a module with some unbound items. One of them is date_completed. I gave the item datatype DATE and formatmask "DD-MM-RRRR". But in the application, when I type 290108, I get FRM-50026 "date must be entered like : DD-MM-YYYY.
    But I gave the item a format mask!
    Can somebody help me?

    But I gave the item a format mask!Then enter it in the format mask and not as a number
    It is doing exactly what you are telling it to do
    Nicolette

Maybe you are looking for

  • My iTunes library is "damaged" and now thousands of songs are missing. How do I get them back without re-importing each one?

    I tried to open my library and it said the library had been corrupted and saved as a damaged file. When it finally opened thousands of songs were missing. I can't re-download and then re-import each of these songs. I tried to repair the library after

  • A good microphone for Skype?

    When I'm on Skype I use my external monitor, and my 15" retina MBP is in clamshell mode. This is why I need a microphone to use Skype. I heard that you can't use USB-powered microphones on a Mac. Is this true? What microphone can you recommend me? I'

  • Copy of queries

    Hello I have the following problem: I have a query which delivers some result. When I copy the query using SAVE AS the new query delivers "no data found". Does SAVE AS not copy a query correctly? who has any idea what could be the problem? thank you

  • Best way to update an indicator

    I've attached a very simple vi to demonstrate my question. I'm making a test using the state-machine architecture. In the test, there is an indicator on the front panel which is to be updated at various places in the test. My question is ... what is

  • Good password manager for mac

    Can someone recoomend a safe and goos password manager for OSX Mavericks? Thanks! Jo