Last year to date

afternoon all,
I am so confuse with these year to date dates, what is the best practice if you want to get all the dates from last year upto today's date.
For example, Today is 16/01/2009, so effectively the last year to date would be 16/01/2008 to 16/01/2009.
I am thinking of using =Today-365
or  =Currentdate-365
or  =(dateserial('y',-1,)
Perhaps you can give me some ideas?
Regards
Jehanzeb

I forgot to ask another question. I am using the following formula under my Record Selection formula,
Does this formula means from Last year to date?
({lab_rework.rework_date} in date(year(currentdate),1,1) to
dateserial(year(currentdate), month(currentdate)+1,1)-1
Sorry but I am so confused with these date formulas.
The purpose is to get last year to date records, that is 16/01/2008 to 16/01/2009 where 16 is currentdate.
Regards
Jehanzeb

Similar Messages

  • Till Last Year, To Date -  Discoverer......

    We have following table X
    PNO Date Amount
    10 10/31/2006 10
    10 11/30/2006 15
    10 11/30/2007 20
    10 12/31/2007 30
    10 1/31/2008 15
    10 2/29/2008 25
    10 3/31/2008 40
    We need to create report as follows, the parameter is the Date.
    Lets say user pass parameter : 3/31/2008
    The report should look like,
    PNO TillLastYear To date
    10 75 155
    Till Last Year - Sum of Amount column till Last Year
    To Date - Sum of Amount Column to the date parameter passed.
    Could some on guide me how to achieve this......?

    Hi,
    You need to add the PNO item into your report and then create calculations based on your date item:
    TillLastYear SUM(CASE WHEN DateItem < TRUNC(SYSDATE,'Y') THEN Amount END)
    ToDate SUM(CASE WHEN DateItem < :DateParameter THEN Amount END)
    Rod West

  • Last year-to-date figure

    Hello Experts -
    I'm using a customer exit variable to calculate the beginning of the year. And I have a variable input for a calendar month.
    I'm using these two values to get the year-to-date figure.
    How can I calculate the last year-to-date figure?
    Thanks a lot in advance.

    Thanks for the prompt replies.
    I don't have a year so thats why i'm using a customer exit.
    another thing is my calendar month is not the 0CALMONTH. i had to derive it from a timestamp. and its not a time characteristic which we can't create.
    its a NUMC. and i think thats why the offset isn't working either.

  • Last year column data not displying

    Dear All,
    I am working on one of reporting issue where data is not getting displayed for few Last year columns. I have checked at the back end and data is available in info providers.
    I want your help to identify possible reason. I carried below trouble shooting steps.
    1: checked data in back end and its available
    2: all restrictions are proper.
    3: there no issue with query properties, I check all.
    I am doubtful about customer exit code so here it is. Please suggest me whether its good or not.
    WHEN 'ZVAR_LYCW'.
        IF I_STEP = 2.
          CLEAR LOC_VAR_RANGE.
         BREAK-POINT.
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
          WHERE VNAM = 'ZVAR_CALDAY'.
            CLEAR : L_S_RANGE,
                    v_loc_date,
                    v_loc_date1.
            L_S_RANGE-LOW = LOC_VAR_RANGE-LOW.
            L_S_RANGE-LOW(4) = L_S_RANGE-LOW(4) - 1. "low value previos year
            L_S_RANGE-HIGH = LOC_VAR_RANGE-HIGH.
            L_S_RANGE-HIGH(4) = L_S_RANGE-HIGH(4) - 1.
            v_loc_date = L_S_RANGE-LOW. "take input value in another variable
            v_loc_date1 =  L_S_RANGE-HIGH.
            L_S_RANGE-LOW =  v_loc_date.
            L_S_RANGE-HIGH = v_loc_date1. "high value = input, taken into another variable
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
            EXIT.
          ENDLOOP.
        endif.
    Please help.
    Thanks,
    Vishal

    Hi vishal,
    try this:
    WHEN 'ZVAR_LYCW'.
    IF I_STEP = 2.
    CLEAR LOC_VAR_RANGE,L_S_RANGE,
    v_loc_date,
    v_loc_date1.
    * BREAK-POINT.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZVAR_CALDAY'.
    v_loc_date =  LOC_VAR_RANGE-LOW+0(4) - 1.
    v_loc_date1 = LOC_VAR_RANGE-HIGH+0(4)-1.
    L_S_RANGE-LOW = v_loc_date.
    L_S_RANGE-HIGH = v_loc_date1.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    endif.
    Edited by: JAIGUPTA on Jan 20, 2012 6:14 PM

  • Assign Assets value date bydefault as last year doc date.

    My scenario is :
    Assets Purchased date is 01-02.2009(which comes in last year) & we are posting it today.
    I keep default value date as doc date.
    But it comes by default  when i post in same fiscal yr.When i post with last yr doc date,then it takes today date as value date.
    How to keep last yr doc date as value date?

    Thanks.
    I have kept the rule as 3-prime & 4-Alternative.
    Still i m not getting .
    Posting date       01.07.2009
    Document date : 01.02.2009
    So i want Valie date as 01.02.2009.
    I think this rule is applicable in same yr of Posting & Value date only.
    When i use date within same yr then this rule getting apply,but when i used different fiscal yr then it takes Posting date as value date.
    So how to Keep value date as doc dt( which is in last yr) ?

  • To find last year's data / a particular year's data

    Hi ,
    How to find out the data for the entire last year , i tried like
    entered_date between to_char( '12/31/2008 11:59:59', 'MM/DD/YYYY HH12:MI:SS')
    and to_char('01/01/2010 00:00:00', 'MM/DD/YYYY HH12:MI:SS' ) , but it is an invalid number error.
    thanks.

    Hi,
    If you want something that doesn't require hard-coding a year, but automatically figures out what year it is:
    WHERE   entered_date     >= ADD_MONTHS ( TRUNC (SYSDATE, 'YEAR')
                                              , -24
    AND     entered_date     <  ADD_MONTHS ( TRUNC (SYSDATE, 'YEAR')
                                              , -12
                                    )There are a couple of things to notice about the expression you posted (besides using TO_CHAR instead of TO_DATE):
    WHERE  entered_date     BETWEEN TO_DATE ('12/31/2008 11:59:59', 'MM/DD/YYYY HH12:MI:SS')
                          AND       TO_DATE ('01/01/2010 00:00:00', 'MM/DD/YYYY HH12:MI:SS')BETWEEN includes both endpoints, so the expression above covers a tiny bit more than one year. It includes one second from 2008 and one second from 2010, as well as all of 2009.
    Currently 2010 is the last year, so the expression you posted (as well as my suggestion) is actually for the year before last year, but it can easily be changed for any year.

  • Dates -- Pulling the last year data!, which should'nt be the case.

    Need some basic SQL Help ..
    Iam supposed to pull the data based on a date column(end_time) -- Yesterday 3PM untill Today's 3PM.
    Iam getting last year's data too in additon to Current Data.
    Where am i comparing wrong??
    SELECT a.*
    FROM table a
    WHERE TO_CHAR (a.action_end_time, 'MM/DD/YYYY HH24:MM:SS') >=
    TO_CHAR (SYSDATE - 1, 'MM/DD/YYYY')
    || ' 15:00:00'
    AND TO_CHAR (a.action_end_time, 'MM/DD/YYYY HH24:MM:SS') <=
    TO_CHAR (SYSDATE, 'MM/DD/YYYY')
    || ' 15:00:00'
    ORDER BY a.end_time;

    Date math, 1 = 1 day 1 / 24 = 1 hour, trunc with no date format gives midnight
    Try this.
    select a.* from table a where
      a.action_end_time between trunc(sysdate) + (15 * 1 / 24)
                            and trunc(sysdate - 1) + (15 * 1 / 24) In your example you are comparing strings, not dates.

  • Sales Summary - Compare same weekday sales last year.

    Post Author: geoffh
    CA Forum: Formula
    I have a table storing invoices going back several years. I wish to calculate the total sales for yesterdays date, & compare it with total sales for the same weekday in the previous year. For example if it is Tuesday today, I need to calculate Mondays total sales (yesterday) & also Mondays total sales for the same week period last year.
    Date fields I have available are 'history.date_invoiced' (invoice date) , history.week_invoiced , history_year.invoiced. Sales values are history.sell_account & history.sell_cash.
    I'm new to crystal.......Using V 11.0.0.1282 . Any help would be greatly appreciated.

    Post Author: yangster
    CA Forum: Formula
    create a formula with the following informationnumbervar weeknumber_curr_year := datepart("ww", dateadd("d", -1, ));numbervar weekdaynumber_curr_year := datepart("d", , 1);  //assuming sunday is the start date of the week, change to 2 if monday isthose 2 variables will tell you the current week number and what day of the week you are after for the current yearnumbervar last_year := dateadd("yyyy", -1, currentdate);if year() = last_year and datepart("ww", ) = weeknumber_curr_year anddatepart("d", , 1) = weekdaynumber_curr_year then amt_field else 0put that in the details section and create a summary of the formula and you should have the total sum of sales for exactly the same week and day of week one year prior to yesterdaymaybe kai has a more simplified solution but that's what comes off the top of my head

  • Last Year Sales Report

    I have a requirement where say user selects year and months by prompts eg. 2008 jan and 2008 feb. It should also give me sales for last year and should be arranged as rows.
    2008 Jan Sales
    2008 Feb Sales
    2007 Jan Sales
    2007 Feb Sales
    How to go about it?
    Thanks

    You would need to expose another column (you can hide it, of course) that contains the month number (monthnum) equivalent (1 - 12) of the month name (Jan - Dec). Set primary sorting (1) to the year in descending order and secondary sorting (2) to the monthnum column in ascending order.
    As for getting "last year's" data from the prompt, say you have a prompt called "Year." Then you would create two "year" filters, on the Year column, as follows:
    "column name".year = @{Year}
    OR
    "column name".year = @{Year}-1
    This will pull both the "prompt year" and the year before.

  • Last Yr Plan Data Vs Current yr Plan Data

    Hi gurus,
    Cd some one tell me when we are into a situaion where need to compare Plan Values Vs Last Yr and Current Yr,
    1. How we are going to do this.
    2. How Versions will be differentiated?
    3. Will be Plan Valus of Last Year still can be changed or else they will be in  
        Display Mode. For me it does not make sense to change Last Year Plan Data.
    Thanks a lot for all your kind inputs.
    Quick assistance is highly appreciated.
    Regards,
    BI-IP Guest

    Hi ,
    I think u can take a multiprovider on three cubes in which
    1.)The last year content will be in the standard infocube (b'coz according to any business data can be changed within a particular time limit)
    2.) The current year's content also u have to put in standard infocube
    3.) The plan data u can put in real time infocube on which u can define aggregation level and planning function and sequences.
    now u can report on the multiprovider by which u can compare the data on the respective three years.
    Regards,
    Supriya

  • SSRS expression for today,yesterday,Lastweek ,Last fortnight,Last Month, Year to date

    Hi All;
    I have a field called createdon 
    Using this field i need to create the SSRS expression for the table as below 
    Any help much appreciated
    Thanks
    Pradnya07

    use expressions as below
    assuming this is to be done in SSRS
    Today
    =COUNT(IIF(
    DateDiff(DateInterval.Day,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Day,Cdate("01/01/1900"),Now()),Fields!YourRequiredField.Value,Nothing))
    Yesterday
    =COUNT(IIF(
    DateDiff(DateInterval.Day,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Day,Cdate("01/01/1900"),Now())-1,Fields!YourRequiredField.Value,Nothing))
    LastWeek
    =COUNT(IIF(
    DateDiff(DateInterval.Week,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Week,Cdate("01/01/1900"),Now())-1,Fields!YourRequiredField.Value,Nothing))
    Last fortnight
    =COUNT(IIF(
    (DateDiff(DateInterval.Week,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Week,Cdate("01/01/1900"),Now())-1)
    Or (DateDiff(DateInterval.Week,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Week,Cdate("01/01/1900"),Now())-2),Fields!YourRequiredField.Value,Nothing))
    Last Month
    =COUNT(IIF(DateDiff(DateInterval.Month,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Month,Cdate("01/01/1900"),Now())-1,Fields!YourRequiredField.Value,Nothing))
    Year To Date
    =COUNT(IIF(DateDiff(DateInterval.Year,Cdate("01/01/1900"),Fields!createdon.Value) = DateDiff(DateInterval.Year,Cdate("01/01/1900"),Now())
    And
    DateDiff(DateInterval.Day,Cdate("01/01/1900"),Fields!createdon.Value) <= DateDiff(DateInterval.Day,Cdate("01/01/1900"),Now()),Fields!YourRequiredField.Value,Nothing))
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to fetch year till date value for earning for current ,last and year

    hi,
    how to fetch year till date value for earning for current ,last and year before that from payroll result
    plz reply soon,
    pratyush

    Dear Pratyush,
    Pick this from CRT.
    Use LDB PNPCE & Fire event GET PAYROLL &
    then you can pick from CRT.
    Hope this helps.
    Kindly reward in case useful.
    Regards & Thanks,
    Darshan Mulmule

  • Parameter for Last Week, Last Month & Last Year from the current Date

    I have a crystal report that has a StartDate & EndDate parameters from the stored procedure that I am calling. Now i got a new requirement saying that my user wants a drop-down parameter in which they need to be able to select last week (Sunday to Saturday), last month, last year instead of manually selecting start date and end date parameters? Can anyone please explain me how to do this?
    (FYI, I am using Crystal 2008)

    Hi Naveen,
    You'll need to handle the logic in the Stored Proc's where clause.
    If you're using oracle, I have something like this in the Stored Proc's where clause for our reports:
    Where {Date_Field} Between
    Decode('{?Relative Date}',
    'Yesterday', sysdate - 1,
    'Last Week', Tunc(sysdate, 'IW')-7)
    AND
    Decode('{?Relative Date}',
    'Yesterday', sysdate,
    'Last Week', Tunc(sysdate, 'IW'))
    where 'Relative Date' is a prompt in the Stored Proc and 'yesterday'. 'last week' are the 'static values' in the prompt.
    -Abhilash

  • Just bought a new iphone 5 i have an old imac computer OSX 10.5.8 and itune version 10 (updated at great cost last year for iphone4) it dosen't let me restore data... any chance of update or do i have to thow away my computer (and never by Mac aga data 0

    Just bought a new iphone 5, i have an old imac computer OSX 10.5.8 and itune version 10 (updated at great cost last year for iphone4) it dosen't let me restore data... any chance of update or do i have to thow away my computer (and never by Mac again?)

    You an use your iPhone without connecting it to a computer.
    But the product description for the iPhone clearly states that in order to sync with a Mac you must have OSX 10.6.8 or later. That version of the OSX is usually called Snow Leopard. There are two mo recent versions of OSX. OSX 10.7.x (Lion) and OSX 10.8.x (Mountain Lion).
    If you can upgrade your computer to at least Snow Leopard I suggest you do so.

  • Mavericks install failed on my late 2008 MBP. Says I should contact the software provider. Want to do a system restore, using Time Machine, but latest date to use is from last year - even tho did a backup before the download?

    I downloaded the free Mavericks upgrade to my late 2008 MBP on Friday.  I made sure to plug in my external hard drive so that Time Machine could back up beforehand.  (I should say I'm not clear about the different kinds of backups that Time Machine does - I just plug it in and let it go.).
    So have tried several times over the weekend to install, it takes 46 minutes each time - only to tell me it can't do it.  There was an error message of needing to contact the software provider (or something similar).  After searching the internet (on my husband's computer - since my MBP is rendered useless right now) I decided maybe I should wait on Mavericks and just do a system restore.  However, when I plugged in the Hard Drive and proceed to System Restore, the latest date available is one from September of 2012 (14 months ago)...  I've wondered if the date might be wrong?  But I'm afraid to choose it because I'm not sure what I would lose.  It might take me back to Snow Leopard rather than Lion... (however, the version on Restore was 10.8.1 which is Mtn Lion, right?  Even tho it was last year...)
    Some sources online say that I should go into applications and delete the install -- but I can't get to anything on my computer. 
    I tried to do a reboot in safe mode - but not sure if it worked... 
    I did look on the installer log error and the latest error is: 
    Local Host  Report crash [378]
    Can anyone help me?  (Using simpleton, non-techie language?
    Thanks

    I downloaded the free Mavericks upgrade to my late 2008 MBP on Friday.  I made sure to plug in my external hard drive so that Time Machine could back up beforehand.  (I should say I'm not clear about the different kinds of backups that Time Machine does - I just plug it in and let it go.).
    So have tried several times over the weekend to install, it takes 46 minutes each time - only to tell me it can't do it.  There was an error message of needing to contact the software provider (or something similar).  After searching the internet (on my husband's computer - since my MBP is rendered useless right now) I decided maybe I should wait on Mavericks and just do a system restore.  However, when I plugged in the Hard Drive and proceed to System Restore, the latest date available is one from September of 2012 (14 months ago)...  I've wondered if the date might be wrong?  But I'm afraid to choose it because I'm not sure what I would lose.  It might take me back to Snow Leopard rather than Lion... (however, the version on Restore was 10.8.1 which is Mtn Lion, right?  Even tho it was last year...)
    Some sources online say that I should go into applications and delete the install -- but I can't get to anything on my computer. 
    I tried to do a reboot in safe mode - but not sure if it worked... 
    I did look on the installer log error and the latest error is: 
    Local Host  Report crash [378]
    Can anyone help me?  (Using simpleton, non-techie language?
    Thanks

Maybe you are looking for

  • Problems after Leopard upgrade with ATI 9800 Pro 256MB

    I don't know if this is related.. but I've been battling multiple problems ever since I upgraded my G5 to Leopard a week ago. Everything was perfect under Tiger. The problem that only occurred directly after upgrading to Leopard... is that my graphic

  • REUSE_ALV_HIERSEQ_LIST_DISPLAY without colors

    Hi, I'm printing a list with REUSE_ALV_HIERSEQ_LIST_DISPLAY but I don't want the headers coloured because we need to print it in a Black and white printer... Is it possible?? Thanks!

  • How to smooth edges of a layer in Illustrator?

    Okay, I'm not exactly sure how to phrase my question, but I'll do my best. Basically I have a drawing that was made in Photoshop and now I need to make it larger. However, it gets pixellated of course. Therefore I want to put it in Illustrator and ma

  • How can I get the umlauts back when I convert a German pdf-file?

    I translate German (patents mostly) into English and need to convert German pdf-files into editable Word files. I am currently working on a computer that has Word 2003 with the compatibility pack that allows it to handle docx files for Word 7. How do

  • Manual Running Total

    Post Author: dbmngleaf CA Forum: Formula I'm using Crystal Report XI and I have a report where I need to supress data and show a running count for just the records that are showing on the report.  My supression works fine but the running count isn't.