Increase by one calendar day

The user enters a Monday date in a date/time object. It is, and needs to be displayed in full (Monday, July 16, 2012) When the user then clicks a check box object, the remaining days of that week are populated into four other date.time objects. I was trying to use the following FormCalc to verify the user selected a "Monday" date and if yes, then add one day for each other field but it does not work.
Here's an example form section -
// Get the number of days since epoch (Jan 1, 1900).
var dateNum = Date2Num(Day1.formattedValue,"M/D/YYYY")
// Convert the number of days to the full weekday name.
MondayCheck.rawValue = Num2Date(dateNum,"EEEE")
if (MondayCheck.rawValue ne "Monday") then
xfa.host.messageBox("First Requested Day Must Be a Monday.");
$.rawValue = "";
endif
DayTwo.Day2.rawValue = Num2Date(Date2num(Day1.rawValue,"YYYY-MM-DD")+1,"EEEE, MMMM D, YYYY");
DayThree.Day3.rawValue = Num2Date(Date2num(Day1.rawValue,"YYYY-MM-DD")+1,"EEEE, MMMM D, YYYY");
DayFour.Day4.rawValue = Num2Date(Date2num(Day1.rawValue,"YYYY-MM-DD")+1,"EEEE, MMMM D, YYYY");
DayFive.Day5.rawValue = Num2Date(Date2num(Day1.rawValue,"YYYY-MM-DD")+1,"EEEE, MMMM D, YYYY");

I've done something similar but found it easier to use more variables:
var endDate = Date2Num($,"YYYY-MM-DD")
var dayOfWeek = Num2Date(endDate, "E")
if (dayOfWeek <> 7) then
          xfa.host.messageBox("Ending date must be a Saturday")
          $ = null
          xfa.host.setFocus("$")
endif
and then I populate the other fields with this (I don't use date fields for the calculated dates, just text fields):
Pg1.subTableAux.Table1.Row1[6].Date = Num2Date(endDate - 0, "DD")
Pg1.subTableAux.Table1.Row1[5].Date = Num2Date(endDate - 1, "DD")
Pg1.subTableAux.Table1.Row1[4].Date = Num2Date(endDate - 2, "DD")
etc...

Similar Messages

  • I have a problem with iCal.Since 2 days ago,I couldn't add new event in iCal on my ipad2.It Keeps saying 'No calendar has been set", then if I go to Calendar field,choose one calendar,it gives this msg "That event doesn't belong to that event store".

    I have a problem with iCal.Since 2 days ago,I couldn't add new event in iCal on my ipad2.It Keeps saying 'No calendar has been set", then if I go to Calendar field,choose one calendar,it gives this msg "That event doesn't belong to that event store". I can add event from iCloud and from my iCal on my iMac. Please help

    Most likely you have Office 2004 which are PPC-only applications and will not work in Lion. Upgrade to Office 2011. Other alternatives are:
    Apple's iWork suite (Pages, Numbers, and Keynote.)
    Open Office (Office 2007-like suite compatible with OS X.)
    NeoOffice (similar to Open Office.)
    LibreOffice (a new direction for the Open Office suite.)

  • I have multiple calendars set up but not all are displaying in iOS 7 notification center.  I just get a heading stating "there is one all-day event scheduled" in the tomorrow summary.  Can't get it to show the details of the event.  any ideas?

    I have multiple calendars set up but not all are displaying in iOS 7 notification center.  I just get a heading stating "there is one all-day event scheduled" in the tomorrow summary.  Can't get it to show the details of the event.  any ideas?

    have you tried rebooting your computer?

  • Calendar Day format (Xcelsius dash with LO prompts connected to SAP-BW)

    Hi guys.
    I built a dashboard using Xcelsius 2008 with a few LiveOffice prompts. Some are optional and these don't cause any issues, the only one causing problems is one of the two compulsory ones (the other is related to Calendar Month).
    The BW query connected to the universe on which the WebI query have been built has two variable selections: the first on Calendar Month, the second on Calendar Day. I haven't been able to find a way to pass Calendar Day data to the query.
    When I launch it from WebIntelligence, I select the value from a "calendar". This is the way it is displayed: "dd/mm/yyyy hh:mm:ss AM". When I select a value from this calendar and I launch the query, results are displayed in the proper way.
    I added the query to an Excel file that I've subsequently imported into Xcelsius. As I said before every other prompt works perfectly, the only one not working is the Calendar Day prompt. I tried passing this date in several ways, but I receive the message "Invalid format (LO 26000)".
    These ways include:
    - dd/mm/yyyy [0CALDAY].[AAAAMMDD]
    - dd.mm.yyyy
    - dd/mm/yyyy
    - yyyymmdd
    - ddmmyyyy
    Did anyone have ideas on how to pass these data in a proper way to the LO prompt from Xcelsius?
    Thanks a lot.

    Hi Kevin, we decided to scrap the "Calendar Day" use because we didn't find a solution to pass the data from Xcelsius to BW.
    There's still an issue. This seemed to work before but now it's not working anymore. We also have a Calendar Month variable. When Live Office creates a prompt on the Excel document, the variable is displayed like this (for instance, NOV 2009 [0CALMONTH].[200911]).
    To avoid problems with keys, I've also created a separate query containing a Month list of values and the string to be passed to BW is created putting together the informal name (NOV 2009) and the unique name ( [CALMONTH].[200911]). When I insert this time prompt in the Xcelsius document, I receive the LO26315 message. If I remove it (I've got other six prompts, none of them related to a date), everything works fine.
    Anyone ever had to pass a similar value from Xcelsius to BW?

  • How do i make the value increase by one at a time?

    Hello guys,i'm really new to Adobe Flash,i just started a few days ago and im making a minigame and i want to know how to make a value to increase by one at a time,what do i mean?
    For example if my Start Value is 20,then go to 21,then 22 and so on
    Thanks in advance

    So as Gnast said you have to increase de variable with the value of the speed increment.
    I give you a code sample that increment a dummy control speed handler that checks the value every frame.. You can edit you current conditionals that make the speed changue.
    var speed: int = (speed) ? speed : 1;
    function increase_speed(value: int = 0) {
      speed += value;
      trace("Now the speed is: " + speed);
    function control_speed_hadler(e: Event) {
      //some conditionals
      if (this.currentFrame == 100) { //it's a loop
        this.increase_speed(1);
    this.addEventListener(Event.ENTER_FRAME, this.control_speed_hadler);
    I hope it help you

  • Converting Calendar day to Number of Days(Period to analyze in MC46)

    Dear All,
                Regards.We got a requirement where:
    1).The BW Report(Slow moving Item) should be in the same format as MC46.Like,having "Period to Analyze:No. of Days since consumption) in the input selection screen ,
    2) Calculate the Stock Value for the that particular day(Eg:For 30,60 or 100 Days backwards from Today)
    (Eg: Today:02/04/08
    Period to Analyze: 30days
    Day for which stock is calculated = 02/03/08).
    -The BW Standard report calculates for a Particular "Calendar Day(Period interval) rather than No. of Days  
      Guys,it would be fantastic if someone could take time to help me out with this issue...
    Manythanks
    Arun

    Check this one: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11291595-0501-0010-c881-e02c27261b55 if it helps

  • No Selective Deletion on Inventory Cube 0IC_C03 via Calendar Day

    Hi,
    I need to repair my Inventory Cube <b>0IC_C03</b> for a certain date. To do that, I need to perform a <i><b>Selective Deletion</b></i> on the Cube and perform a <b>FULL REPAIR REQUEST</b> limited on that day only.
    But to my surprise, I could not find a Calendar Day entry in the "<i>DeletionSelection</i>".
    Is there a workaround or do I need to switch on anything?
    --Jkyle

    Hi Roberto,
    You are too humble! Everybody knows you are the <b>ONE</b>
    (he heh from the <b>MATRIX</b> movie)
    Anyway, I dont think Export Datasource would help. As you may know, Inventory Cube <b>0IC_C03</b> uses 2LIS_03_BX and 2LIS_03_BF data sources. This <b>CUBE</b> is somehow special.
    To cut this problem short, I'll go straight to the point. <i>How could I perform INIT via 2LIS_03_BX and 2LIS_03_BF w/o R/3 downtime at all</i>? The reason I came to this <i>Selective Deletion</i> thing is to patch up the mess the INIT would introduce when there are users around by using a REPAIR FULL REQUEST only for that single day...
    I hope you get what I mean...
    Thanks!
    --Jkyle

  • I am trying to locate an email that I deleted and assume should be in the trash.  However my trash now only goes back a few days - how can I increase the number of days the trash remains accessible for

    I am trying to locate an email that I deleted and assume should be in the trash.  However my trash now only goes back a few days - how can I increase the number of days the trash remains accessible for.

    StevieJ wrote:
    I am trying to locate an email that I deleted and assume should be in the trash.  However my trash now only goes back a few days - how can I increase the number of days the trash remains accessible for.
    Check Mail Preferences, Accounts tab. Select the account, then the Mailbox Behaviors tab. See if you have it set to Permanently erase deleted messages when: One week old. (or less)

  • Mix published and unpublished events in one calendar?

    Just got an iPhone.
    Is there a way to mix published and unpublished events in one calendar?
    I've heard that other calendar software have this option.
    With iCal on a Mac it's possible to choose which calendars to view, so then it's not a problem to have one published and one unpublished calendar.
    But with iCal on iPhone you can only choose between viewing ONE and ALL calendars.
    I subscribe to a bunch of other peoples calendars, so viewing ALL is never an option..
    So now I would like to write all my events, published and private, into ONE calendar. Is that possible?
    Anyone?

    Yes. I tried changing the setting to Sync All Events (instead of the time limited sync) and let it refresh. No change. No display
    I also tried rescheduling the event by one hour on the same day (no other changes), then save. No change. No display.
    I ended up deleting the events and re-entering them, with identical information (including the recurring end date, remarks, etc., you name it), and then the events appeared like the rest of them in the same calendar.
    I'd still like to know if there is a solution to the original problem. I'm still concerned that other events, maybe in the other calendar as well, are no appearing and it's impossible to rely on a sample or to verify every event.
    Thanks for your assistance.

  • Calendar day number?

    Hello gurus, I am trying to to create a report in which I display the number of people that checked in and out of a hotel. I need this report to be shown daily. The problem is that I need a comparison between each day and last year's same day. I currently have (ignore the '/'):
    /////////////////////////////////////////KF 2007/////////////////KF 2008
    0CALMONTH2/0CALDAY
    Jan
    ////////01.01.2007
    ////////01.02.2007
    ////////01.03.2007
    ////////01.04.2007
    and so on, until yesterday.
    Right now the report is not working correclty. On KF 2007 I have created a selection which includes the amount of check ins, displayed by "current calendar year" (SAP exit variable) with a -1 offset. The same goes for KF 2008 but without the offset. The problem is that 0CALDAY takes values from 2007 and 2008, so the report gets partially populated on 2007 days (because KF 2008 is all blank) and partially populated on 2008 days (because KF 2007 is all blank).
    I thought about having a Calendar Day characteristic in which month and year fields were removed (so it would only show 01-31 for each month) and was looking on the business content to see if there is already a characteristic that would meet this requirement. However, I could not find one. Does such a characteristic exist, or how can I create one? Or if this is too complicated, how can I get around this problem?

    My requirement has changed slightly. Now what is needed is a characteristic which gives me exactly the day of the month, and a characteristic that gives me the month in text. 0CALMONTH2 gives me the month in numbers (1-12) but I need their names (January-December), and what I have seen is that this characteristic does not allow me to display them as text. And for the day characteristic, I cannot find one which gives me the day of the month (1-28, 1-29, 1-30 or 1-31 dependeing on the month).
    Any ideas?

  • Sun one calendar channel showing unnecessary information.

    hi all,
    sun one calendar claims that an allday event does not conflict with the events in that day, and it is true as long as i am viewing the application. but when i am on the portal server, the sun one calendar channel displays conflict between the all day event and any other event in that day . how do i solve this problems as it is irritating my clients which are too influential to ignore.
    regards
    kimi

    I found the solution to this problem , i edited the calendar provider and removed the tag that shows the conflict.

  • Selecting more than one calendar but not all?

    is it possible on the iTouch iCal application to view more than one calendar but not all? I have one calendar that I would like to have available, but when I check for conflicts, that calendar doesn't matter (if it were included, every day would be a conflict).
    I don't see any way to do this, but I am hoping someone has a workaround or other solution.
    Charles

    Let's say I have three calendars: Home, Business, and Daily Junk. The Daily Junk calendar serves as a type of to-do list (and yes, I know there's a separate todo list -- this is an example). I want to see a view that shows Home and Business at the same time, but not Daily Junk. I can view all -- which gets Daily Junk -- or I can view Home or Business, but not Home and Business but not Daily Junk.
    Am I missing something obvious? When I select a specific calendar, I don't have an option to do more than one -- I get a specific calendar or all of them.
    Thanks much

  • 'Average Weighted with Calendar Days' in Exception Aggregation

    Dear specialists,
    I have created a query with a lot of calculated keyfigures.
    One of my calculated keyfigures shows percentage values.
    When I select a calendar day, my report shows correct results
    for the percentage values.
    But when I execute the report without selecting a calendar day,
    I get strange results like 3,21 % instead of 97,49 %.
    There is a new functionality with version 7.0, where we can set
    Aggregation properties like 'Average Weighted with Calendar Days' .
    But when I select this with Ref. characteristic 'calendar day',
    my report does not show any value or any result.
    Are there any other properties to set in Aggregation or Calculations.
    Please give me more information about this issue
    regards Osman Akuzun

    Hi,
           When you define an Exception aggregation on number of work days. There might be some reference characteristic defined in your Bex.
    For exmaple, take a scenario like below. Your BW data is like below
    0Employee           StockIssued
    XXX                            50                                
    XXX                            10              
    YYY                           20              
    YYY                            30             
    YYY                            40             
    ZZZ                            50              
    ZZZ                            100            
    ZZZ                            30              
    Suppose the first row which has values like XXX and 50 is not a working day and remaining all are working days then the exception aggregation applied using AV2 on the characteristic  0Employee will be caluclated in your Report as below
    For XXX, it will       10/1 = 10 (because only 1 working day for the employee XXX)
    For YYY, it will       90/3 = 30 (because all  3  are working days for the employee YYY)
    For ZZZ, it will       180/3 = 60 (because  all  3  are working days for the employee ZZZ)
    This is how the exception aggregation works. Try to see the similar kind of example in your system and try to relate in the same lines explained by me. You can understand.
    Regards
    Sunil

  • When I try to export one calendar, it exports them all

    I am trying to export one of my Calendars on iCal into a Google Calendar.  Even though I only have the one calendar selected, it exports all my calendars.  I am using Lion.

    Others have the same complaint.  iCal on the iPad can do recurring appointments, but not in the format you want (First Tuesday of every Month).  It will do the same DATE each month (e.g, the 25th of each month), but for now it does not do a particular DAY of each month.

  • Problem syncing one calendar no matter what I do

    I have one calendar (out of 5 total) that simply does not want to sync. I get the dreaded "iTunes could not sync calendars to the iPhone... because the iPhone disconnected."
    The key thing to note is that this is a calendar I subscribe to via the icalx service. I have other calendars that I tried there and they synced fine.
    Here's what I've tried to no avail...
    1. Reset sync history under iSync preferences.
    2. Deleted calendar on my Mac and recreated it, using a different name even (nothing weird about the name either).
    3. Changed "Do not sync events older than" setting to 1 day.
    4. I looked at each event in the calendar and all of them seem to be appear fine in terms of data.
    Checking the error log on my Mac, I see this suspicious entry:
    2007-07-03 16:14:52.675|AppleMobileSync|2187:25237504|SocketStreamHandler.c:_SocketLogCall back| ERROR: SocketRecv (data): return of 0 bytes
    2007-07-03 16:14:52.676|AppleMobileSync|2187:25237504|StreamHandler.c:_ReadFunc| ERROR: Error reading data: Can't read data
    2007-07-03 16:14:52.677|AppleMobileSync|2187:25237504|DeviceLinkConnection.c:_DLHandlerThr eadMessagePortCallback| ERROR: Could not receive message: '(null)'
    2007-07-03 16:14:52.678|AppleMobileSync|2187:2684407808|DeviceLinkConnection.c:_DLMainThre adMessagePortCallback| ERROR: Error creating components from read data: 'NULL data returned from read'
    MBP + iPhone   Mac OS X (10.4.10)  

    FYI... I'm now using .Mac to publish/subscribe to calendars and this is no longer an issue.

Maybe you are looking for