Add one day to a binding

Hi all,
I assume this is a very dumb question... How can I add one day to a date that is like this :
#{bindings.ChooseDateCrah.inputValue}
It's a binding in a the header text property of a column.
That : #{bindings.ChooseDateCrah.inputValue + 1} or that : #{bindings.ChooseDateCrah.inputValue} +1 does not work.
Thanks.
Frédéric.

Hi Frédéric,
Yeah, you cannot apply a converter on the headerText attribute of a column. However, you can instead place an outputText in the header facet of the column, then the converter option still works.
As for the code, no, in the RowImpl object in the getter method of your calculated attribute. (That method is quite complicated for a read only value though).
You can check my reply at Re: How to access menbers of the current row of an af:table component? as for how to create a custom converter. In your specific case, however, you would have to extends DateTimeConverter and decorate the getAsObject and getAsString methods in order to add one day before calling super.getAsString and remove one day from the returned value of super.getAsObject before returning to ensure reversibility.
A managed bean solution would imply the use of the implements Map EL hack which is both easy and hard, depending on your experience level with JSF and EL.
Regards,
~ Simon

Similar Messages

  • Add one day to the current date

    Hi all,
    A stupid question...
    How can I add one day to the current date in a select. I want something similar to add one month to current date, but with days:
    something like:
    select TO_CHAR (ADD_MONTHS (SYSDATE, -1), 'DD-MM-YYYY')
    from dual
    Thanks

    select sysdate+1 "add one day" from dual;

  • XSLT Mapping: how to add one day to TimeStamp

    Hello Experts,
    My requirement is to add one day to current timestamp. Used $TimeSent to get the currenttimestamp. In Expired field, the need to add one day
    say Created= 2011-03-30T20:29:13Z
           Expired = 2011-03-31T20:29:13Z
         <xsl:param name="TimeSent"/>
         <created><xsl:value-of select="$TimeSent"/></created>
         <expired>2011-03-31T20:29:13Z</expired>
    How to add one day to the current timestamp. I am new to XSLT mapping and need some help with the code.
    Thanks
    Shikha Jain
    Edited by: Jain Shikha on Mar 30, 2011 8:34 PM
    Edited by: Jain Shikha on Mar 30, 2011 8:36 PM

    Hello All,
    Thanks for your reply. i tried the function and the code is working when i am testing in stylus studio. But the same code gives error when i  tested the xslt mapping in PI (Error: TransformerConfigurationException triggered while loading XSLT mapping).
    $TimeSent function is working when code is tested in PI , but it doesnot give value in stylus studio. Also Current-dateTime() function is doesnot give value in PI but works in stylus studio. Is there any difference in the functions used in stylus studio and XSLT mapping in PI?
    Also if i remove the code used for function(to add one day to timestamp), and use constant value(2011-04-02T23:24:56.763Z)the code is working fine in PI. Please help me to find out where the code is going wrong when tested in PI.
    Below is the XSLT code i am using
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ds="http://xsltsl.org/date-time" xmlns:functx="http://www.functx.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">
       <xsl:function name="functx:next-day" as="xs:date?">
          <xsl:param name="TimeSent" as="xs:anyAtomicType?"/>
          <xsl:sequence select="xs:date(current-date()) + xs:dayTimeDuration(&apos;P1D&apos;) "/>
       </xsl:function> 
    <xsl:template match="/">
          <xsl:param name="TimeSent"/>
          <soapenv:Envelope xmlns:olsa="http://www.skillsoft.com/services/olsa_v1_0/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
             <soapenv:Header>
                <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
                   <wsu:Timestamp wsu:Id="Timestamp-191900" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsu:Created>
                         <xsl:value-of select="$TimeSent"/>
               </wsu:Created>
    <wsu:Expires>
         <xsl:value-of select="concat(substring(functx:next-day($TimeSent) ,1,10) ,&apos;T&apos;, current-time())"/>                  </wsu:Expires>
                   </wsu:Timestamp>
                   <wsse:UsernameToken wsu:Id="UsernameToken-19030197" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                      <wsse:Username>ABC</wsse:Username>
                      <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">XYZ</wsse:Password>
                      <wsse:Nonce>erDTBNoUWv7GdHDaErrLwA==</wsse:Nonce>
                      <wsu:Created>2011-02-15T23:24:56.763Z</wsu:Created>
                   </wsse:UsernameToken>
                </wsse:Security>
             </soapenv:Header>
             <soapenv:Body>
                <olsa:GetMultiActionSignOnUrlRequest>
                   <olsa:customerId>ABC</olsa:customerId>
                   <olsa:userName>XYZ</olsa:userName>
                   <olsa:actionType>launch</olsa:actionType>
                   <olsa:assetId>222499_eng</olsa:assetId>
                   <olsa:groupCode>testgrp</olsa:groupCode>
                </olsa:GetMultiActionSignOnUrlRequest>
             </soapenv:Body>
          </soapenv:Envelope>
       </xsl:template>
    </xsl:stylesheet>
    Thanks
    Shikha Jain
    Edited by: Jain Shikha on Apr 2, 2011 9:51 PM

  • How to add one day to a Date?

    Hi,
    What is the simplest way to daa one day to a Date object?
    Thanks.
    Pengyou

    You use a database query just to add one day
    to a Date object? I wouldn't call that the "simplest"
    way at all.I was going to suggest firing off an email to the naval observatory and having them carry out the calculation, emailing the result back (maybe using JMS, not sure - web service possibly?) but the OP's way is simpler.

  • Add one day to current date

    Hi ,
    can anyone tell me the logic for add one day to sysdate()?
    Thanks and Regards,
    Ranjith.

    Hi Ranjith K,
    you can use sysdate()+1 to increment the system date.
    I hope this will help you out.
    Regards,
    Akhileshkiran.

  • Add one day to java.sql.date

    I ask user to enter a date: yyyy-mm-dd, then I want to add one day to that date, I don't know how to do it?
    java.sql.Date time2 = java.sql.Date.valueOf( args[0] );
    Many Thanks.

    since a date object is really nothing more than a long you can always add one day's worth of milliseconds to it....
    long milliInADay = 1000 * 60 * 60 * 24;
    Date d = ......
    d.setTime(d.getTime() + milliInADay);although there may be some issues with this i'm unaware of, but seems pretty straightforward to me.

  • Add one day

    Hello everyone,
    I have a problem with sql*loader. in my file I have one date but this date its not correctly. This date I must reduce a day but not as it is possible to be done.
    You have any idea.
    Thank you very much for your help.
    Frank

    An example of how you can do that :
    SQL> create table test_date(a date, b varchar2(30));
    Table created.
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    $ cat test_date.dat
    20070731,AAA
    20070801,BBB
    $ cat test_date.ctl
    load data
    INFILE 'test_date.dat'
    REPLACE
    INTO TABLE test_date
    FIELDS TERMINATED BY ','
    a char "TO_DATE(:a,'yyyymmdd') - 1",
    b char
    $ sqlldr test/test control=test_date.ctl
    SQL*Loader: Release 10.2.0.2.0 - Production on Wed Aug 1 15:54:22 2007
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 2
    $ sqlplus test/test
    SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 1 15:54:26 2007
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select * from test_date;
    A         B
    30-JUL-07 AAA
    31-JUL-07 BBB
    SQL>

  • Adding one day to a month

    Hi,
    I would like to add one day to a date. It seems like such a simple thing yet I have only found how to add a day to sysdate (or to add months to a given date).
    Any help?
    Thanks.
    Leah

    Hi,
    If you want a specific date then it should be in date type,
    so you cannot do: '01-MAR-2011'+1
    but you can do: to_date('01-MAR-2011')+1
    it seems to me that you just tried to add 1 to a string looking like a date
    Tamir

  • How do you add 1 day to a date in BI answers

    Hi,
    I tried just putting (date column + 1) in the column formula but it wasn't having
    any of it. In SQL you can just put SYSDATE + 1. Is there any way of converting the
    date to a number, so I can do maths with it?
    Many thanks for any ideas,
    - Julian

    To Add One day to the column, place the following formula:
    TIMESTAMPADD(SQL_TSI_DAY, 1,Time."Day Date")
    similarly we can write the formulas using different intervals based on the date format in the column
    Here are the intervals :
    SQL_TSI_SECOND,
    SQL_TSI_MINUTE,
    SQL_TSI_HOUR,
    SQL_TSI_DAY,
    SQL_TSI_WEEK,
    SQL_TSI_MONTH,
    SQL_TSI_QUARTER,
    SQL_TSI_YEAR.
    Hope your question is answered.
    Thanks,
    -Amith.

  • Oracle date function to add one second

    how to add one second to the date, example, SYSDATE+1 will add one day to current day, but how to add one second to the current time. for example, the current date is "2006-4-21 12:01:12", and I want to add 1 second to the current time, and the result will be "2006-4-21 12:01:13", how to achieve it&#65311;&#65311;

    select to_char(sysdate,'hh24:mi:ss'),
    to_char(sysdate+1/24/60/60,'hh24:mi:ss') from dual;
    TO_CHAR( TO_CHAR(
    09:44:44 09:44:45

  • Strange one day adding to tasks due date (Outlook –SharePoint- MS Project integration)

    Hi,
    I have integrated MS Project 2010 with MS Outlook 2010 via SharePoint. Everything has gone more or less smoothly (as it could be for Microsoft
    J), but finally I got into a strange problem. Strangely enough,
    MS Outlook, while syncing tasks with SharePoint (these tasks are pre-created in MS Project and synced with SharePoint beforehand),
    adds one day to due dates of each of these tasks, e.g. for “Task 1” due date in MS Project and on SharePoint is 20.10.2010, but MS Outlook puts it as 21.10.2010, for “Task 2” due date in MS Project and on SharePoint is 22.10.2010, but MS Outlook
    puts it as 23.10.2010, etc.
    What is a strange trick? I have checked work time, holidays - everything is the same in MS Outlook, SharePoint and MS Project (8-17, Mon-Fri, 8 hours, 40 days a week). What could it be?
    Thanks a lot.

    Hi,
    It seems nobody can reply, so I will reply by myself because I found out the answer. The answer from Microsoft is pretty simple - ha-ha we know about,
    we will work on it, wait, ha-ha. Firstly let me quote Microsoft senior tech answer on the same request 3 month ago:
    "Hello Artur,
    The senior tech got back to me with the following conclusion:
    Outlook is rounding everything set to 12:00 PM or after to the next date because the columns mapped to start date and due dates are only Date columns,
    not date/time columns.
    It is rounding at noon because of the .5 decimal. This can be seen in Excel - 41115.5 = 7/25/2012 12:00 in date/time format whereas 41115.49 = 7/25/2012
    11:45.
    The issue seems to be an expected behavior, the next level of support is working on the same but currently I have not been provided with any ETA, so
    it looks like the issue will take a good amount of time to get fixed.
    I would appreciate your patience while we are working on the issue. I will keep you posted as and when I get an update on the issue."
    Sounds good, does not it? Ok. After asking this question recently I got run-around and finally I found the same question unsolved (see the quotation
    before) more than 3 month ago. I have sent it to Microsoft Tech Support. Look at reply I got from them on 22.10.2012:
    "This issue has been noticed and will be handled by the product team. Once we have any updates, it will be responded to you timely". 
    So the basic function does not work properly, there month passed - no way! Wait until what? I could hardly
    even imagine how Microsoft launched the product with such a bug and is not resolving the problem for months.

  • Displaying wrong date(One day earlier then the current)

    Has anyone experienced this problem. I have an inputText field that is to take in a date value. When I use the DateTimeConverter to check if the date is valid, the returned date valu is always one day earlier than the user input day.
    How do I resolve this. Is there a setting that I need to change?
    Thanks in advance.
    -Meena

    Which JSF Implementation is this code extract from?
    I am using IBM WebSphere 6.0 and also experiencing a problem with an InputText displaying the day before. For example when the InputText value is set to 21-Apr-2007, 20-Apr-2007 is displayed. Here is a simplified version of what I'm doing:
    Page - inputTextDates.jsp
         <h:inputText id="opDate" styleClass="inputText"
              binding="#{inputTextDatesBean.htmlInputText}">
         </h:inputText>
    Request-Scope Bean - InputTextDates.java
         private HtmlInputText htmlInputText;
         public HtmlInputText getHtmlInputText() {
              if (this.htmlInputText == null) {
                   this.htmlInputText = new HtmlInputText();
                   // create a calendar for manipulating dates for the chosen timezone
                   GregorianCalendar gregorianCalendar = new GregorianCalendar(TimeZone.getTimeZone("US/Central"));
                   gregorianCalendar.setTime(new Date(107, 3, 21));
                   // create a date time converter for the timezone
                   DateTimeConverter dateTimeConverter = new DateTimeConverter();
                   dateTimeConverter.setTimeZone(gregorianCalendar.getTimeZone());
                   // create a calendar picker
                   HtmlInputHelperDatePicker htmlInputHelperDatePicker = new HtmlInputHelperDatePicker();
                   htmlInputHelperDatePicker.setId("myId"); // have to give an ID
                   // populate the input text
                   this.htmlInputText.setValue(gregorianCalendar.getTime());
                   this.htmlInputText.setConverter(dateTimeConverter);
                   this.htmlInputText.getChildren().add(htmlInputHelperDatePicker);
              return this.htmlInputText;
         public void setHtmlInputText(HtmlInputText htmlInputText) {
              this.htmlInputText = htmlInputText;
         }

  • Hello All:  What to thank everyone in advance for taking the time to respond to this post:  We just had a 600 laptop image delopoyment of macbook pro's and since we  were rushed to do this in one day-. i forgot to connect them to wireless before creating

    Hello All:
    What to thank everyone in advance for taking the time to respond to this post:
    We just had a 600 laptop image delopoyment of macbook pro's and since we
    were rushed to do this in one day…. i forgot to connect them to wireless before
    creating an image.  (worked from 5am ~ 5 am)
    DOES ANYONE KNOW HOW TO create a login script, where to place it,
    and how to push out wireless setting so when a user logs in, it would automatically
    bind them to a certain wireless?
    We want to strictly do this through our Mac os x server snow leopard. 
    Please help as I am going back this Sunday to resolve this.  I will have to
    manually open up 600 laptops and add them to the wireless if i don't
    find out a solution.

    THANKS A BUNCH!
    BUT!!!
    can you help me create a script with this information.
    You led me to the right direction.  I will be using mac os x server and doing login script.
    here is what i typed up so far but i don't know how to make the file. I know the command to run throgh shell but do not know how to make the file run so when i put it in login script it will place this wireless setting on all computers.
    They are ging to be using this information:
    /usr/sbin/networksetup -addpreferredwirelessnetworkatindex Airport atams 0 WPA2 [F3fd+mi7yV]]
    /usr/sbin/networksetup -setairportnetwork Airport atams F3fd+mi7yV
    -removepreferredwirelessnetwork Airport heritage
    I did this on terminal and it worked.  so how can i know deploy this to all laptops that are directly plugged in.

  • After updating to the latest version, I'm able to open and use the browser for one day. The next day, the browser doesn't not open up. please help!!!

    -reformatted computer, reinstalled everything
    -downloaded the newest version of mozilla
    -happily went online for one day
    -next day, browser does not load
    -later the next day, browser doesn't even open up
    -now when i go to open mozilla, something like this shows up:
    "server busy, taking too long...if your firewall is on make sure mozilla is allowed to browse...adjust proxy settings blah blah...

    HI Juanverano,
    Not a problem, Safe Mode will disable addons and hardware acceleration. If this continues and it is not an add on this will be the next step to try to disable acceleration:
    Try disabling graphics hardware acceleration. Since this feature was added to Firefox, it has gradually improved, but there still are a few glitches.
    You might need to restart Firefox in order for this to take effect, so save all work first (e.g., mail you are composing, online documents you're editing, etc.).
    Then perform these steps:
    #Open Firefox ''Options'' window (''Preferences'' on Mac or Linux) as follows:
    #* In Firefox 29.0 and above, click the menu button [[Image:New Fx Menu]] and select ''Options'' for Windows or ''Preferences'' on Mac or Linux.
    #* In Firefox 28.0 and previous versions, click the orange Firefox button at the top left, then select the "Options" button, or, if there is no Firefox button at the top, go to Tools > Options.
    #In the Firefox Options (or Preferences) window, click the ''Advanced'' tab, then select ''General''.
    #In the settings list, you should find the ''Use hardware acceleration when available'' checkbox. Uncheck this checkbox.
    #Now, restart Firefox and see if the problems persist.
    Additionally, please check for updates for your graphics driver by following the steps mentioned in the following Knowledge base articles:
    * [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]
    * [[Upgrade your graphics drivers to use hardware acceleration and WebGL]]
    Did this fix your problems? Please report back to us!
    Thank you.

  • A one day entry on iPhone calendar shows as two days on iPad?!

    I know you're thinking this is probably something to do with timezones differences between the iPhone and the iPad?
    Each year I put the F1 grand prix races in my calendar as a one-day event on the Sunday they take place. On Sunday 27th March 2011 is the Australian grand prix.
    On my iPhone (I'm in the UK and running the latest version on an iPhone 4 etc.) it shows as a one-day event but on my iPad it stradles two-days! When I go to click EDIT on the iPhone entry, despite showing as a Sunday entry only, it shows that it starts on Sunday 27th March and finished on Monday 28th March!
    I spent a couple of hours looking at this. No other grand prix date has this discrepancy between the iPad and the iPhone calendars (that are sync'd with MobileMe calendar). It's just this one date.
    I even had a friend add an event on the same date and it also suggested it was a one day event but when you edit it then it shows it's a two day event.
    And then the only explanation dawned on me. It wasn't time zone setting differences as that would affect all the entries like that the whole year.
    27th March is the date the clocks go forward in the UK for British Summer Time!
    Is it a bug though? Why does the iPhone show it as one day but the iPad show it as two?
    What is it with Apple and calendars and alarms?! And don't start me on the MobileMe calendar and Outlook integration. It's rubbish.

    Hi Boneart - I feel for you. 
    I too have the same issue (Feb 2014) which I have just discovered today as I am not a strong user of all-day events, until today when I tried to schedule annual holidays in my diary.  I can confirm the EXACT SAME issues that you have described with all-day events displacing 24 hrs EARLY for sync Outlook to iOS calendar, and all-day events displaced 24hrs LATE for sync iOS calendar to Outlook.  I also confirm that the issue does not exist for specified time appointments, as you also found. 
    I note from several other discussion threads that Apple have previously focussed on an issue of all-day events syncing to span 2-days; that is not yet apparent in my situation  BUT I will be watching with interest whether a subsequent synchronisation causes the displaced dates to also synchronise back providing the same event apparently spanning 2 days but ACTUALLY existing as two events with identical properties on successive days.
    One oddity is that I also operate in the NZ time zone; I wonder if that is significant???
    For a brief period I trialled iCloud with a thrid-party patch to resolve the native iCloud issue of not providing 2-way synch with Outlook.  That worked beautifully ... until Apple provided an update to the iCloud interface which destroyed all functionality for me.  I'm back to hard-wire sync via USB wire again.  Very frustrating!!
    Finally it is sad that Apple has no interest in these issues.  It strikes me that as soon as there is a non-Apple platform involved they blame the other system and wash their hands of it.
    iPhone 4; iOS 7.0.6 (latest); Outlook 2007 & iTunes 11.1.5.5 on Win7Pro 64x v6.1

Maybe you are looking for

  • Mandatory Folio Builder Panel Update

    Can't find any discussion of the new features for 12.3.1 - or are there any? Thanks

  • Problem with blackberry

    I try to download the application world from the link sent to me it says ,"Sorry, your session has expired.Please close all brower windows andthen return to the welcom page to start again." PLEASE HELP !!!

  • Getting error when opening the sap console

    Dear Experts,                      When I opening the SAP console There is a error message like Get process list failed:80070424 The specified service does not exist as an installed service.

  • How to generate event on other control within one event

    Hello I am using event structure. When program is inside the event case of one control, I want to trigger the �mouse down� event on another control at that time (without operating that another control), so that next time, another control�s event is c

  • Apple TV box in portrait mode

    Hello, Is it possible to connect the Apple TV box on a screen fixed vertical (portrait mode)? Is it possible to rotate the image 90 ° directly from the Apple TV?