Duration between Start date of the project and user defined  Date

Hi All,
I need to calculate the the duration between the projects start  date and the date (month and year) the User defines. Also wat charateristics do we use to to restrict 0DATE_KYF to differentiate between forcast date and actual date.Any help will be appreciated

You need to create formula variable for the date objects and used those variables to calculate the difference of the dates in either formula or calculated key figure.
thanks.
Wond

Similar Messages

  • IChat v4 - where are the example and user defined back drops?

    When I go to iChat preferences, audio/video, then select show video effects, there are only two pages (one including sepia, etc. and the other including bulge, etc.). There is no Eiffel Tower image or a page with user defined choices.
    Am I missing something?

    You will only get two pages if your Mac falls below Apple's system requirements for backdrop. (Intel Core 2 Duo and a camera with exposure and focus lock.) As it is, you're only getting the first two pages of effects because you have a dual processor Mac.

  • Calculate duration between start date and end date

    Hi everyone,
    I'm facing with problem when calculating duration between start & end with this function below . This fuction  is working well, but i want to change working time from 8:00 am to 17:30 pm instead of 17:00 , and lunch time from 12:00 to 13:30 instead
    of 13:00 as present . Problem is , i changed data type of start hour and end hour from INT to decimal . But it is still wrong .
    Pls help me . It's very urgent bcoz i need it for monthly report .
    Many thanks .
    Here is function which im using :
    ALTER Function [dbo].[GetWorkingMin](@pStartDate DateTime, @pEndDate DateTime) Returns Int
    AS
    Begin
          Declare @StartDate DateTime = @pStartDate
          Declare @EndDate DateTime = @pEndDate
        Declare @WorkMin int = 0   -- Initialize counter
        Declare @Reverse bit       -- Flag to hold if direction is reverse
        Declare @StartWorkingHour int = 8   -- Start of business hours (can be supplied as an argument if needed)
        Declare @EndWorkingHour int = 17    -- End of business hours (can be supplied as an argument if needed)
        Declare @Holidays Table (HDate DateTime)   --  Table variable to hold holidayes
          Declare @LunchHour int = 12
          Declare @StartHour int = DatePart(HH, @StartDate)
          Declare @EndHour int = DatePart(HH, @EndDate)
        -- If dates are in reverse order, switch them and set flag
        If @StartDate>@EndDate
        Begin
            Declare @TempDate DateTime=@StartDate
            Set @StartDate=@EndDate
            Set @EndDate=@TempDate
            Set @Reverse=1
        End
        Else Set @Reverse = 0
        -- Get country holidays from table based on the country code
        Insert Into @Holidays (HDate) Select HDate from HOLIDAY Where HDATE>=DateAdd(dd, DateDiff(dd,0,@StartDate), 0)
        If DatePart(HH, @StartDate)<@StartWorkingHour
        begin
                Set @StartDate = DateAdd(hour, @StartWorkingHour, DateDiff(DAY, 0, @StartDate))  
                -- If Start time is less than start hour, set it to start hour
                Set @StartHour = DatePart(HH, @StartDate)
        end
        If DatePart(HH, @StartDate)>=@EndWorkingHour
        begin
                Set @StartDate = DateAdd(hour, @StartWorkingHour+24, DateDiff(DAY, 0, @StartDate))
                -- If Start time is after end hour, set it to start hour of next day
                Set @StartHour = DatePart(HH, @StartDate)
                --return DatePart(day, @StartDate)
        end
        If DatePart(HH, @EndDate)>=@EndWorkingHour
        begin
                Set @EndDate = DateAdd(hour, @EndWorkingHour, DateDiff(DAY, 0, @EndDate))
                -- If End time is after end hour, set it to end hour
                Set @EndHour = DatePart(HH, @EndDate)           
        end
        If DatePart(HH, @EndDate)<@StartWorkingHour
        begin
                Set @EndDate = DateAdd(hour, @EndWorkingHour-24, DateDiff(DAY, 0, @EndDate))
                -- If End time is before start hour, set it to end hour of previous day
                Set @EndHour = DatePart(HH, @EndDate)
        end
        If (@StartHour>=@LunchHour and @StartHour < (@LunchHour +1))
        Begin
                Set @StartDate = DateAdd(hour, @LunchHour + 1, DateDiff(DAY, 0, @StartDate))
                -- If Start time is in lunch time, set it to 12
                Set @StartHour = @LunchHour + 1   
        End
        If (@StartHour>=@LunchHour and DatePart(DW, @StartDate) = 7)
        Begin
                Set @StartDate = DateAdd(hour, @StartWorkingHour + 24, DateDiff(DAY, 0, @StartDate))
                Set @StartHour = DatePart(HH, @StartDate)
        End
        If (@EndHour>=@LunchHour and @EndHour < (@LunchHour +1))
        Begin
                Set @EndDate = DateAdd(hour, @LunchHour +1, DateDiff(DAY, 0, @EndDate))
                -- If End time is in lunch time, set it to 13
                Set @EndHour = @LunchHour + 1
          End
          If (DatePart(DW, @EndDate) = 7 and DatePart(HH, @EndDate) >= @LunchHour) Set @EndDate = DateAdd(hour, @LunchHour, DateDiff(DAY, 0, @EndDate)) -- If End day is Saturday and End time is after end hour, set it to end hour of saturday
        If @StartDate>@EndDate Return 0
        -- If Start and End is on same day
        If DateDiff(Day,@StartDate,@EndDate) <= 0
        Begin
            If (Datepart(dw,@StartDate)>1 And DATEPART(dw,@StartDate)<7)  
            -- If day is between sunday and saturday
                If (Select Count(*) From @Holidays Where HDATE=DateAdd(dd, DateDiff(dd,0,@StartDate), 0)) = 0  
                -- If day is not a holiday
                    If @EndDate<@StartDate Return 0 Else
                    Begin
                                  Set @WorkMin=DATEDIFF(MI, @StartDate, @EndDate)
                                  -- Calculate difference
                                  If (@StartHour <= @LunchHour and @EndHour >= @LunchHour + 1)
                                        Set @WorkMin = @WorkMin - 60;                                   
                            End
                Else Return 0
            Else Begin
                      if (DATEPART(dw,@StartDate)=7) set @WorkMin = @WorkMin + DATEDIFF(MI, @StartDate, @EndDate);
                      Return @WorkMin
            End
        End
        Else Begin
            Declare @Partial int=1   
            -- Set partial day flag
            While DateDiff(Day,@StartDate,@EndDate) > 0   
            -- While start and end days are different
            Begin
                If Datepart(dw,@StartDate)>1 And DATEPART(dw,@StartDate)<7    --  If this is a weekday
                Begin
                    If (Select Count(*) From @Holidays Where HDATE=DateAdd(dd, DateDiff(dd,0,@StartDate), 0)) = 0  -- If this is not a holiday
                    Begin
                        If @Partial=1  
                        -- If this is the first iteration, calculate partial time
                        Begin
                            Set @WorkMin=@WorkMin + DATEDIFF(MI, @StartDate, DateAdd(hour, @EndWorkingHour, DateDiff(DAY, 0, @StartDate)))
                            If (@StartHour <= @LunchHour) Set @WorkMin = @WorkMin - 60;
                            Set @StartDate=DateAdd(hour, @StartWorkingHour+24, DateDiff(DAY, 0, @StartDate))
                            Set @Partial=0
                        End
                        Else Begin     
                        -- If this is a full day, add full minutes
                            Set @WorkMin=@WorkMin + (@EndWorkingHour-@StartWorkingHour - 1)*60        
                            Set @StartDate = DATEADD(DD,1,@StartDate)
                        End
                    End
                    Else Set @StartDate = DATEADD(DD,1,@StartDate)  
                End
                Else Begin
                            If (DATEPART(dw,@StartDate)=7)
                            Begin                   
                                  Set @WorkMin = @WorkMin + DATEDIFF(MI, @StartDate, DateAdd(hour, @LunchHour, DateDiff(DAY,
    0, @StartDate)));
                            End
                            --Set @StartDate = DATEADD(DD,1,@StartDate)
                            Set @StartDate = DateAdd(hour, @StartWorkingHour + 24, DateDiff(DAY, 0, @StartDate))
                                  Set @StartHour = DatePart(HH, @StartDate)
                      End
            End
            If Datepart(dw,@StartDate)>1 And DATEPART(dw,@StartDate)<7  
            -- If last day is a weekday
                If (Select Count(*) From @Holidays Where HDATE=DateAdd(dd, DateDiff(dd,0,@StartDate), 0)) = 0   
                -- And it is not a holiday
                    Begin
                                  If @Partial=0 Set @WorkMin=@WorkMin + DATEDIFF(MI, @StartDate, @EndDate) Else
    Set @WorkMin=@WorkMin + DATEDIFF(MI, DateAdd(hour, @StartWorkingHour, DateDiff(DAY, 0, @StartDate)), @EndDate)
                                  If (@EndHour >= (@LunchHour + 1)) Set @WorkMin = @WorkMin - 60;
                            End   
                If (DATEPART(dw,@EndDate)=7)
                Begin
                      Set @WorkMin = @WorkMin + DATEDIFF(MI, DateAdd(hour, @StartWorkingHour, DateDiff(DAY, 0, @EndDate)),@EndDate);        
                End
        End
        If @Reverse=1 Set @WorkMin=-@WorkMin
        Return @WorkMin
    End

    The problem is you cannot specify partial hours.
    I think your best bet would be to alter the function sufficiently so it will accept times instead of hours, and where you're making comparisons to the hour, use dates/date functions instead.
    Then, just set the variable as a full time (or datetime, if you need).

  • Two quick questions about the project and timing panes

    1) Is there a hotkey for toggling between the project and timing panes?
    I can't seem to find this anywhere. I know F5 and F6 open and close them, but I'd like to be able to simply activate then without having to click on them. I'd like to be able to simply toggle between them and navigate using the arrow keys
    2) Is there a way to lock together the project and timing views so that when you open a group in one that group is also opened in the other?

    Sure, play/stop SHOULD work, but it doesn't always. And the up/down arrows only work to move layers in some instances. Try this. In a normal project, select a layer in either the layers pane or the canvas. Use the up/down arrows and you'll find Motion cycles between layers. Now close the layers pane (F5) and open it again. Now try to use the up/down arrows. It no longer cycles on my machine (and probably yours).
    In fact, Motion 4 broke a LOT of the keyboard shortcuts that used to work seemlessly in Motion 3.
    For example: I create a text object and start typing my text. About 30 percent of the time hitting the spacebar while typing text will cause playback to start. Pure annoyance.
    I used to be able to Hit HOME and END to go to the start and end of the project when the layer's pane is active, now I can't.
    About 25 percent of the time when I'm in the layers pane and I hit spacebar, instead of playing the project, I turn off the layer that was currently selected.
    Those are just a few of my pet peeves. There are definitely some real issues with shortcuts in Motion 4.
    Andy

  • How to get start date of the period for a given date from cube

    I have a situation where i need to find the start day of the period for a given date. is there a way to know that. i want to use that in my report. i enter the date from my report(i have date parameter), depends on the date, i want to display the start day
    of the period. how can i write expression for that in my report?
    ram

    Hi ramprasad74,
    According to your description, you are using Analysis Services as a data source for the report, the cube has hierarchy: Fyear, FQuarter, FPeriod, fweek, Fdate. You want to add a date parameter to the report, after you changed value of the parameter, the
    report will return the first day of FPeriod.
    To achieve your goal, we need to add a parameter to the report, then use the parameter in mdx query. For detail information, please refer to the following steps:
    In the Report Data pane, right-click on a dataset created from a SQL Server Analysis Services data source type, and then click Query. The MDX query designer opens in Design mode.
    On the toolbar, click Design to toggle to Query mode.
    On the MDX query designer toolbar, click Query Parameters symbol. The Query Parameters dialog box opens.
    In the Parameter column, click <Enter Parameter>, and then type the name of a parameter.
    In the Dimension column, choose a value from the drop-down list.
    In the Hierarchy column, choose a value from the drop-down list.
    In the Default column, from the drop-down list, select a single value.
    Click OK. 
    In query designer dialog box, type the mdx query like below:
    with member [Measures].[FirstChild]
    as
    [Date].[Fiscal].currentmember.parent.firstchild.name
    select {[Measures].[FirstChild]} on 0,
    [Date].[Fiscal].[Date].members on 1
    from
    ( SELECT ( STRTOSET(@ParameterName, CONSTRAINED) ) on 0
    from
    [Cube]
    Here are relevant threads you can reference:
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/c7146ac3-40ea-4d53-b321-c707aebbd405/how-to-pass-date-parameter-to-mdx-query
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/fd12a865-bc90-4a65-af42-ce38a8cfa29b/pass-date-time-parameter-to-mdx-query-ssrs
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.

  • I am creating a video using the green screen option- I imported a picture for the background of the project and videotaped someone using a green screen. Is it possible to move the video of the person around so it is not blocking the picture behind it?

    I am creating a video using the green screen option in iMovie.   I imported a picture for the background of the project and videotaped someone using a green screen. Is it possible to move the video of the person around so it is not blocking the picture behind it?

    To enable this right you need Acrobat, not the free Reader.
    However, starting from Reader X it is possible to add simple markups to any file, unless it has been specifically disallowed by the creator of the file.

  • Difference bw the data staging of generic and appli specefic data sources

    Hi,
       Can anyone tell the difference between data staging of generic and appl specific data sources. Like we know that LO data stage in queued delta, update queue and BW delta queue, i want to know actually where the generic data stages before it is loaded into BW.
    Thanks.

    Generic data sources are based on either a DB table/view, a function module or an ABAP query. So normally the data stages in the corresponding DB tables or you calculate it at extraction time. There is no update queue like in LO.
    Best regards
       Dirk

  • Dynamically generating the ssrs dataset and filling the data into the dataset and binding it to ssrs report dynamically

    I have a work to do, in ssrs we are using server reports in our project. i am looking for dynamically generating the ssrs dataset and filling the data into the dataset and binding the dataset to ssrs report(RDL) dynamically.
    Getting the dataset dynamically has a solution by using Report Definition Customization Extension (RDCE), but the problem is binding that dataset to the report(RDL) dynamically was not there.
    Here is the reference for RDCE http://www.codeproject.com/Articles/355461/Dynamically-Pointing-to-Shared-Data-Sources-on-SQL#6
    I looked for binding the dataset to the report(RDL) dynamically and searched many sites but i did not get the solution. Can anyone help me here.
    Is there any custom assemblies or any Custom data processing extensions to work around. Please help.
    Thanks in advance

    Hi Prabha2233,
    Thank you for your question.
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
    Thank you for your understanding and support.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • I went to convert a clip and the screen is now green...both the project and original clip. help

    I went to convert a clip and the screen is now green...both the project and original clip. help

    MacBook Pro: Distorted video or no video issues .  The affected computers  were manufactured between approximately May 2007 and September 2008.

  • Any difference between Master data and User master data ?

    Any difference between Master data and User master data ?

    hi
    A user master record defines the authorizations assigned to a user. Based on these authorizations one can access the master data.
    Master data - it is the data which is used long term in SAP r/3 system such as vendor master , material master, customer master,
    there is no such thing like user master data to the best of my knowledge
    hope this helps
    regds
    Manan

  • I finished adding my transtions to my timeline.  I was having crashing issues so I shut down everything before I rendered the project and now it tells me that the project is unreadable or the file is too new for this version of final cut. What Happened?

    I finished adding my transtions to my timeline.  I was having crashing issues so I shut down everything before I rendered the project and now it tells me that the project is unreadable or the file is too new for this version of final cut. What Happened?

    What Happened?
    No way for us to know.  But if your system was crashing, there definitely was a problem.  The FCE error message you got normally indicates the FCE project file has been corrupted.  This probably happened due to whatever caused your system to crash & shutting down the system.
    First, make sure your system is running correctly.  Then, use the Finder to navigate to /users/yourusername/Documents/Final Cut Express Documents/Autosave Vault and find the most recent backup copy of your FCE project file.  Copy the file to your Final Cut Express Documents folder (copy the file, don't just move it).  Then double-click the copy to open it in FCE.  It should open ok, but will probably not have your most recent edits (transitions).  You may have to rebuild the transitions, but at least you will be back in action.

  • I'm using acrobat pro in my project after debuging the project and after opening a certain number of PDF files I receive the message: the maximum number of files opened has been reached, you have to close some files to continu.even doing that, I steel rec

    I'm using acrobat pro in my project after debuging the project and after opening a certain number of PDF files I receive the message: the maximum number of files opened has been reached, you have to close some files to continu.even doing that, I steel receive the same message.Some one can tel what to do please? Thanks

    Hi Memalyn
    Essentially, the bare issue is that you have a 500GB hard drive with only 10GB free. That is not sufficient to run the system properly. The two options you have are to move/remove files to another location, or to install a larger hard drive (eg 2TB). Drive space has nothing to do with SMC firmware, and usually large media files are to blame.
    My first recommendation is this: download and run the free OmniDiskSweeper. This will identify the exact size of all your folders - you can drill down into the subfolders and figure out where your largest culprits are. For example, you might find that your Pictures folder contains both an iPhoto Library and copies that you've brought in from a camera but are outside the iPhoto Library structure. Or perhaps you have a lot of purchased video content in iTunes.
    If you find files that you KNOW you do not need, you can delete them. Don't delete them just because you have a backup, since if the backup fails, you will lose all your copies.
    Don't worry about "cleaners" for now - they don't save much space and can actually cause problems. Deal with the large file situation first and see how you get on.
    Let us know what you find out, and if you manage to get your space back.
    Matt

  • How do I sync my old iPhone 5 to a new laptop PC without losing any iPhone data? The "remove and sync?" option looks like it will leave me with zero data on the iPhone!

    how do I sync my iPhone 5 to a new Toshiba laptop PC without losing any iPhone data? The "remove and sync?" option looks like it will leave me with zero data on the iPhone!

    See Recover your iTunes library from your iPod or iOS device.
    tt2

  • Can I import HTMLs from inside the project and use as portlet page ?

    As you know, I am using Java Studio Creator 2 Update 1 for my current portal project. I have created JSR-168 JSF Portlet Project for my portlet development.
    As I have some html pages ready for my development,
    Can I import HTMLs from inside the project and use as portlet page for my project?
    I did the followings steps:
    1: In side the project - File -> Add Existing Item -> Web Page ( imported test.html page from my local folder)
    2: Let it convert some of the tags for me ( so now it becomes - �test.jsp� )
    3: Set it to initial view.
    4. A default portlet page � newPortletPage.jsp is still there with no initial view.
    Now after doing this, No Visual Designer and Properties window available to for that �test.jsp� page. Though it allowed me to �build� the project successfully.
    When I build and run the portlet application, got the error message �Error occurred in portlet!� on Pluto Portal. Please advice.

    You do not open fcpproject files. You don't double click or anything else. The files have to be in the correct folder structure in the Final Cut Projects folder and the application opens them automatically. Can you post screen shots of the Final Cut Projects folder and its location.

  • How to get the Full and final settelment date from PC_payresults

    Hi Experts..sairam.
    We are preparing Functional specification  for a report on Full and final settelement.
    We need to extract the  full and final settelement date from  payresults.
    Full and final settelement would be an offcycle run.
    How can we identify the particular Offcycle is meant for full and final settelment.
    Full and final settelement can be done after date of relieving.
    Please share your ideas to get the field names and logic to fetch.
    Thanks in advance.
    Regards,
    Sairam.

    Hi Praveen,
    I found it from HRPY_RGDIR through SE11.
    But im in confusion in thinking on Logic to find the Full and final settelment processed date.
    First of all..Report has to check WPBP table weather Employment status is Zero.
    Later..It has to read the HRPY_RGDIR table.
    Here what the system to check.What conditions to be validated to fetch the Full and final settelment processed date.Will it be FPPER and INPER as 00000000 or shall we do it from offcycle reason.
    Please share your ideas.Thanks in advance.
    Regards,Sairam.

Maybe you are looking for

  • Rule with SELFITEM-SENDTASKDESCRITION task's workitem goes error

    Dear all,            I have created a workflow with an activity step that uses business object SELFITEM and method SENDTASKDESCRIPTION  with rule AC00000168.           On executing the WF, the workitem successfully goes to right agent.           But,

  • I suspect my hard drive is about to fail..how do i backup my data

    i had a "disk does not exist " message..and the machine was unresponsive. I looked online for solutions and most said my drive was likely dead. There were no symptoms prior. One suggestion was to hit esc. immediately following attempted restart and i

  • New iphone 5 not working properly

    Why my iphone not showing the plug icon on battery even it is 100% charge ,lightning icon is not changing .and also the rotation of the screen is not working ..what should i do?its is new just used it for one day.

  • Converting smart forms as a pdf in different languages

    Hi Experts, I have been created a smart form and later on i converted it to in pdf also, but how can i convert a smart form output into different languages (English(defualt), German, Italian, French, Spanish,). Can anyone tell me about the idea behin

  • No. of defects

    Hi Experts, I am having an small query. In SAP/R3 the "No. of defects" for notification "X" was set from 1 to 0. This changes are not visible in BW ODS "O". This ODS is loaded as Delta from DataSource  "D". Can you please advice.How can I see the cha