How change value of adf.currentDate Date Format change

Hi all


I try by default a variable to bind a SQL query by default Date VO. I used adf.currentDate in the default Expression of the bind Variable.

the expression returns the value in the format 'YYYY-MM-dd', but the format required for the binding variable is "MM/dd/YYYY".


I can have any groovy expression that allows to change the format or should I have to do this programmatically?

Please help me with an idea / code snippet.

Thank you
TK

Published by: 803641 on October 25, 2010 11:50

What type is your variable binding (it seems to be a String/varchar) - If you do date comparison in the database, you must use date comparisons. Assuming you are trying to compare a column in the database, you can use something like:

where your_date_column = to_date(:bind_var, 'YYYY-MM-DD')

If you really need to get a string in the format MM/DD/YYYY, you could:

to_char(to_date(:bind_var, 'YYYY-MM-DD'), 'MM/DD/YYYY')

John

Tags: Java

Similar Questions

  • How can I configure the cell data format

    How can I configure data format of cell numbers: for example, I want to capture 123456.78 and need to be 12A3456.78?

    I tried to put #A # #. # format option, but it didn't work a few time and it became A123456.78.

    I also tried on excel and it worked very well, but I like the numbers better. is there a solution to this problem?

    Thank you

    HEY Chi - Lun,

    I don't think that this is possible as many number format. You should be able to insert A in a text string using a formula, but this would happen in a second cell, not that the number has been entered.

    "Assuming all the"numbers require the same inserted letter after the second number, this should do the work."number" entered in column A; the formula in column B. In the table below, your value as an example is A6.

    = Left (A, 2) & "A" & RIGHT (A, LEN (A) - 2)

    Kind regards

    Barry

  • Date value error ORA-01821: date format not recognized

    Hi team,

    will be running the query below, I'm getting ORA-01821: date format not recognized
    SELECT DISTINCT  to_date(TO_CHAR(csactivated,'DDMONRR'||'24:00:00'),'DD-MON-RR hh24:mi:ss') FROM CUSTOMER_ALL
    and I use the 10g version and I checked the NLS_SESSION_PARAMETERS. IE NLS_TIMESTAMP_FORMAT (DD-MON-RR HH.MI. SSXFF AM)
    ALTER SESSION SET NLS_TIMESTAMP_FORMAT ='DDMONRR HH:MI:SS AM';
    
    SELECT TO_DATE (TO_CHAR (TO_CHAR (SYSDATE, 'DDMONRR') || ' 14:00:00'),
                    'DD-MON-YY HH24:MI:SS')
      FROM DUAL;
    
    output : - 8/17/2012 2:00:00 PM
    

    See you soon,.
    Manik

  • ADF: Affecting date format DD-MON-RRRR

    Hello world

    I use Jdev 11 G.

    I created a VO with the query: select * from employees.
    VO has 24 columns. The column is column hiredate that is currently displayed in the: 25/06/2008, but
    My requirement is to change the format of 25 June 2012.

    How can I achieve this?
    All responses will be very grateful.

    Thank you...

    Go to the view object. Choose the attribute... under the guidance of the user interface... Foramt type, and then select date Simple... and you can define your own format.

    I hope this helps.
    Rakesh

  • How to convert number in the Date format

    Hi Experts,

    I have a date column says. date key order number (ex: 20110202). How to convert this number in format DD/MM/YYYY.

    Thanks in advance
    V

    Vincent Krishna wrote:
    Hi Experts,

    I have a date column says. date key order number (ex: 20110202). How to convert this number in format DD/MM/YYYY.

    Thanks in advance
    V

    SQL> select to_char(to_date('20110202','YYYYMMDD'),'DD/MM/YYYY') from dual;
    
    TO_CHAR(TO
    ----------
    02/02/2011
    
  • How does the work in AS3 data formatting?

    In some of my older languages, I could convert various types of data in a well-formatted string.

    For example «!» x (20)"would be uppercase the first letter of the string.

    "$> > >, > > 9.99 would give me $1.23.

    (999) 999-9999 converting an integer or a string in a beautiful phone number research

    etc, etc.

    How did this kind of thing better done in AS 3?

    Also, is there a way to feed these masks to the text input controls so that (for example) a telephone number can be entered one already visible (de)-

    Thaks,

    VC

    The default controls are not hidden input, but some third-party controls

    do.

    There is a formatting help in StringFormatter and StringUtil

  • How to subtract two measures of date format?

    Hello

    I need to create the following report

    DATE OF BOOK... ARRIVAL_DATE... LEAD_TIME... This is arrival_date-book_date

    10 November 10... 15 November 10... 5

    In the above example the enforcement timeframe should return 5.

    How can achieve this, I get the error:
    [nQSError: 10058] A general error occurred. [nQSError: 22023] An arithmetic operation is performed on a non-numeric type. (HY000)
    SQL issued: SELECT "Business block Start Date. "' Start date ', 'Business block. "" Block ID ","Business block. "" Date of creation ","Business block. "' Start date '-'Business block. "" Created on "OF THE"Business block summary.

    Tried to THROW the dates, Bud did not work either
    Concerning
    Giuliano

    Use the timetstampdiff function

    TIMESTAMPDIFF (sql_tsi_day, DATE, ARRIVAL_DATE BOOK)

    You cannot use Arithmetic operation on date columns.

    Kind regards
    Sandeep

  • Convert number to date format

    HI team,

    I have a problem, how we can convert number in date format?
    This is the result of the query.

    SQL > col START_TIME for 999999999999999999999999
    SQL > select start_time in qrtz_triggers;

    START_TIME
    -------------------------
    1364243906000
    1364589406000

    So, I have to change the date format niumber rto.

    My date format as for example: "" Mar 25,2013 20:36:45 ""


    Please suggest me...
    Thank you
    Chavigny

    Published by: 939938 on March 14, 2013 06:39

    This is the number of milliseconds since January 1, 1970.

    SQL> SELECT to_char(to_date('01/01/1970','mm/dd/yyyy')+1364243906000/24/60/60/1000
      2  ,'Mon dd, yyyy hh:mi:ss PM') FROM dual;
    
    TO_CHAR(TO_DATE('01/01/1970','
    ------------------------------
    Mar 25, 2013 08:38:26 PM
    

    So in your query instead of start_time use
    TO_CHAR (to_date (' 01/01/1970 ',' mm/DD/yyyy') + start_time/24/60/60/1000,' Mon DD, YYYY HH: mi: ss PM "")

    Published by: kendenny on March 14, 2013 08:31
    Had used mm instead of e for the minutes.

  • How to change the Date format

    Hello

    I have a question, is it possible to change the date format of a date value that comes from the database, therefore with the settings on the computer?

    I use jdev 12 c with Oracle database

    Thank you

    Hello

    You can use af:convertDatetime to set the date.

    Ref:

    Andrejus Baranovskis Blog: Handling of Format of Date and links of the ADF

    http://jdevadf.Oracle.com/ADF-richclient-demo/docs/tagdoc/af_convertDateTime.html

    date format ADF

    Thank you

    Amey

  • How to advocate for regional change of short date format

    This is something relatively trivial but annoying all the same, but I don't know where to go to advocate for change.

    Have just updated for Sierra and one of the first things I notice is the addition of a point at the end of the month in short date format, i.e. 'September 19, 2016'.

    "In Australia, as in the United Kingdom, the standard must not use this period - it should be just'19 Sep 2016", and in the past, that's how it appeared in OSX for the Australia. Don't know why the change.

    This abbreviation is not replaceable by the user, so where can I go to provide appropriate feedback and I hope to have this problem on the track?

    A solution is to make my default language and region of the United Kingdom, but do not know if there is a price to pay for it.

    You can provide feedback to Apple asking them to change it:

    www.Apple.com/Feedback

  • How to change the date format in Lightroom, when importing images?

    When you import into Lightroom, you get the following structure in Lightroom for Macintosh HD.

    Year-> Date.

    I want some level 3 like this structure.   Year-> month-> Date

    How to do this?

    Hi lennartr,

    When you import images, you can change the Date Format in "Copy as DNG, copy or move", but not in the Add box.

    On the right panel, you expand the Destination folder and change the Date Format.

    Let me know if it helps.

    Kind regards

    Tanuj

  • Options for PDF export - how to change the date format?

    Hello


    I use Adobe InDesign CC June 2015 on Windows 7.

    When I export a PDF file to print, the date and the format is ' mm/dd/yyyy' (e.g. 2015/12/11 15:14:21) but I want to be ' dd/mm/yyyy' (for example 12/11/2015-15:14:21).

    I know it's possible because my colleagues have this date format on their PDFs.

    Do you know where I can change this option?


    Thanks in advance,

    Kind regards

    Julie

    Well, if the version of your indesign is french you must change the date format in system preferences

    to take a peek here how you can do

    Change the Format of Date under Windows 7, 8.1 and Windows 10 in dd-mm-yyyy

  • How to change the date format of dd/mm/yyyy to dd/mm/yyyy in the digital signature certificate?

    Digital signature means sign documents as we do by hand; the need for the signature also means that the document has official relevance. In this case, the right date format is absolutely essential. Don't know if this thing depends on Acrobat Reader Dc or the certificate itself, but I have not found a way to move from dd/mm/yyyy to dd/mm/yyyy. The only option that I found in the AR is to print or not the date of the signature. If the problem persists, I could work with other software to sign. Please help is necessary! Thank you guys

    Hi carlop16325670,

    I'm sorry, but this is how it works. There is no way to change this.

    Kind regards
    Nicos

  • How to change the date format in OBIEE

    Hello

    I have a need to change the column to a column of varchar by OBIEE...

    The date column stores the data in the format "YYYY/MM/DD", I need to change that for a column of varchar with this format "YYYYMM"...

    Since I'm pointing directly to the transactional database, I can't make changes to the database level, so I have to do in OBIEE layer, of the ideas of how this could be done?

    Thanks in advance!

    Hi user,

    Reference: http://varanasisaichand.blogspot.com/2010/01/how-to-change-data-format-to-our-custom.html

    http://varanasisaichand.blogspot.com/2010/05/evaluate-function.html

    Thank you
    Saichand.v

  • How to change the date format of the web site?

    Hi all

    We use Jdeveloper 11 g. We have developed a web site and it s is almost done. We use components linked to this day (most of them date. MinValue) very often.

    To change the format of the date of the entire site, but we could not see a way to do this. Even if the database date format is DD. Mr. Composant date. MinValue RR contains the date in MM-DD format. RR.

    Do you know how to change the format of date overall of a website?

    Hello

    I hope will help the following post: http://soadev.blogspot.com/2010/03/change-global-date-format-of-your.html

    Kind regards

    Pino

Maybe you are looking for