Get date minus 3 months

Good morning,
I'm trying to get a string value the contaings the current day minus 3 months.
thanks

Hi,
Thank you for your help, with you suggestions I was able to
find what I need it
thanks

Similar Messages

  • Need to get data for month entered in  user prompt to prior 12months.

    Hi,
    I have a report where i need to display total amount for current month  to prior  12 months data...first column will be current month, second column is (current month-1),3rd col: (current month-2)....( current month-12).
    Is there any way I could use current date to get previous 12 months in  variables?
    For example: if  current date is 02/15/2010, I need get  data for 01/2010, 12/2009, 11/2009,....01/2009.
    For example: if I entered Month: 03  and year:2010 in prompt , then I need to get data for prior 12 months to that in the prompt for month:03?.

    The only way to do this is using restrictions on Universe... here you can have the restrictions for every month or a range using the user prompt and the system date.
    Regards

  • Powershell Get-date minus one day...

    Here is the delima, I need to get yesterdays day in the format of yymmdd.  That's easy if you want todays date:
         get-date -uformat %y%m%d
    Great!  Now how do I get yesterdays date?
         (get-date).AddDays(-1)
    will get me
         Wednesday, June 22, 2011 8:47:51 AM
    But, I cant do
         (get-date).AddDays(-1) -uFormat %y%m%d
    Nor can I do
         (get-date -uFormat %y%m%d).AddDays(-1)
    Nor is there a .Net date/time format of yymmdd.  Any suggestions would be appreciated.  Thank you!

    So if i wanted to get the current date to a format of YYYY.MM.DD, I can get it by
    (get-date).ToString("YYYYMMDD") ?? Since i have file names that contain the below i need only to get those with a certain current date embedded.
    Update_YYYYMMDDHHMMSSMS.log or Update_2014021802113801.log

  • How to get Date in month based on week of month.

    Hi Gurus,
    I have below requirement.
    Quarter(Q) => 1 (Jan-Mar), 2 (Apr-Jun), 3 (Jul-Sep), 4 (Oct-Dec).
    Month (M) =>Jan=1, Feb=2, Mar=3 in Q1,
                        Apr=1, May=2, Jun=3 in Q2,
                        Jul=1, Aug=2, Sep=3 in Q3,
                        Oct=1, Nov=2, Dec=3 in Q4
    If I give Q=3,M=3,W=1,Day=Fri Then i must get 6-Sep-13
    Similarly If I give Q=2,M=1,W=3,Day=Thu Then i must get 18-Apr-13.
    Could anyone help me in above.
    Regards
    Sanjeev

    Believing that when you say week you mean it to be 1-5 in a month with 1st day of the month as the start of the 1st week. You can try this.
    SQL> with t
      2  as
      3  (
      4      select 3 q, 3 m, 1 w, 'Fri' d
      5        from dual
      6       union
      7         all
      8      select 2 q, 1 m, 3 w, 'Thu' d
      9        from dual
    10  )
    11  select q, m, w, d, d_day
    12    from (
    13              select y + (level - 1) d_day
    14                   , ceil(extract(day from cast(y + (level - 1) as timestamp))/7) week_7_day
    15                   , t.*
    16                from (
    17                        select add_months(trunc(sysdate, 'year'), (q*3-3)+(m-1)) y
    18                             , t.*
    19                          from t
    20                     ) t
    21             connect
    22                  by level <= last_day(y) - y + 1
    23                 and y = prior y
    24                 and prior dbms_random.value() is not null
    25         )
    26   where w = week_7_day
    27     and substr(to_char(d_day, 'day'), 1, 3) = lower(d);
             Q          M          W D   D_DAY
             2          1          3 Thu 18-APR-13
             3          3          1 Fri 06-SEP-13
    SQL>

  • When I pre ordered my iphone 6 i was told I was going to get an additional 1 gig of data per month for a year.  It even shows it on the receipt i received with the phone.  When will I see that reflected on my account.  I have had my new phone for a week a

    When I pre ordered my iphone 6 i was told I was going to get an additional 1 gig of data per month for a year.  It even shows it on the receipt i received with the phone.  When will I see that reflected on my account.  I have had my new phone for a week and used tons more data than usual and am hoping that will save me this month.

    concretedonkey, I'm glad you were able to take advantage of this offer when you ordered your new iPhone 6. I can certainly review your account to ensure this was added for you. Please reply to the direct message I have sent you.
    AndreaS_VZW
    Follow us on Twitter @VZWSupport

  • How to get the currrent month and year from a new date object

    If I create a new Date object as "d",
    java.util.Date d = new java.util.Date();how can I format the date to get the current Month as 'Jan' and the current year as '2008'. So if I have something like d.getMonth() gets the current month as 'Oct' and d.getYear() gets '2008'
    Thanks,
    Zub

    [Read the flamin' manual you must. Hmm.|http://en.wikipedia.org/wiki/RTFM]
    ~~ Yoda.
    Well no actually, he didn't say that, but he should have.
    Cheers. Keith.
    PS: Don't say that to a 7 foot pissedOff wookie when he's got his head stuck in a smoking hyperdrive, and you're being chased by a S-class battle cruiser... Ask Yoda how he got to be so short.
    PPS: It is the SimpleDateFormat you seek ;-)
    Edited by: corlettk on 14/10/2008 22:37 ~~ Also far to slow... but funny.

  • Anyone help me ...I am writing to get Date, Month and Year...I got errors

    Could some body help me:
    I am try to get Date, Month and Year
    I got stuck, Anyone help me this:
    public class DateMonth
    public static void main(String[] args)
    toDay = new toDay("February 21, 2002");
    dayofWeek = today.getDay();
    System.out.println("Current month is " + toDay.getMonth());
    System.out.println("Current day is " + getDate());
    System.out.println("Current year is " + toDay.getYear());
    toDay.setDate(toDay.getDate()+60)
    System.out.println("Sixty days from now is ");
    System.out.println(toDay);
    }

    Try something like this:
    import java.util.*;
    public class DateMonth {
         public static void main(String[] args) {
              // Note: 0 = January
              Calendar calendar = new GregorianCalendar();
              System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
              System.out.println("MONTH: " + calendar.get(Calendar.MONTH));
              System.out.println("WEEK_OF_YEAR: " + calendar.get(Calendar.WEEK_OF_YEAR));
              System.out.println("WEEK_OF_MONTH: " + calendar.get(Calendar.WEEK_OF_MONTH));
              System.out.println("DATE: " + calendar.get(Calendar.DATE));
              System.out.println("DAY_OF_MONTH: " + calendar.get(Calendar.DAY_OF_MONTH));
              System.out.println("DAY_OF_YEAR: " + calendar.get(Calendar.DAY_OF_YEAR));
              System.out.println("DAY_OF_WEEK: " + calendar.get(Calendar.DAY_OF_WEEK));
              // 60 days from now
              calendar.add(calendar.DATE, 60);
              System.out.println("\nSixty days from now");
              System.out.println("MONTH: " + calendar.get(Calendar.MONTH));
              System.out.println("DATE: " + calendar.get(Calendar.DATE));
              System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
    }Remember that January is 0!
    Take a look at the GregorianCalendar class:
    http://java.sun.com/j2se/1.3/docs/api/java/util/GregorianCalendar.html
    Hope this helps!
    DesQuite

  • Help to  get date before (six month)

    hi,
    i have to get in field  the date of six month ago  what is the best way to do that?
    example.
    if now_date = 14.10.07
    i wont in l_date 14.4.07
    or if now_date =  15.1.2003
    l_date = 15.7.2002
    Regards

    Hi,
    For this logic to work,we will have to use the Offset method for the month as well as the Year part of the date.
    Please refer to the sample code mentioned below:
    data:cur_date type sy-datum.  "Date entered by the user.
    data:wanted_date type sy-datum.    "Date six months ago.
    if suppose the month for the current date is greater than June,i.e from July to December,then the logic should be,
    wanted_date = cur_date + 2(0) - 6.   "Only reduce the month part of the date by 6.
    if suppose the month for the current date is either equal to or less than June,i.e
    from January to June,then the logic should be,
    wanted_date = cur_date + 2(0) - 6.    "Reduce the month by 6.
    wanted_date = cur_date + 4(0) - 1.    "For reducing the year by one as the year also gets changed in this case.
    I hope you understood my point.
    In case you have any further clarifications,do let me know.
    Regards,
    Puneet Jhari.

  • Set variant in infopackage to get backward data 1 month automatically

    Dear all,
    Could anyone tell me how could I set variant in infopackag => tab Data selection  to get backward data 1 month from schedule day (every Monday) automatically? 
    Many thanks & Regards,
    Bigtree K.

    Use this code...
    l_t_range-option = 'BT'
    l_t_range-sign = 'I'.
    l_t_range-low = SY-DATUM - 1.
    l_t_range-high = SY-DATUM.
    Append l_t_range.
    Take a look at this link for more info...
    http://help.sap.com/saphelp_nw04/helpdata/en/a3/4f8f3b294a7f2de10000000a11402f/content.htm

  • Getting data of next 4 months in Webi

    Hello Experts,
    I have data of next  4 years in my database.  I have created one date object in universe and I have created prompt on this date object. My requirement is as follows :
    User will enter the date through prompt and my report should pull data for next 4 months  from entered date  and display in report as follows:
    e.g If user enters date as 17/02/2011, then report should pull data of next 4 months as follows:
          March                          Apr             May           Jun     
    Records for March       Records for April     ........          .......
    I think this should be achivable using Crosstab. But I am not getting exact way to do this.
    Any help in this regard is greatly appreciated.
    Regards,
    Chinmay

    Other approach is:
    1. Go to Universe Designer
    2. Create a filter named "Prompt Date + 4 months"
    In the 'Where' textbox write something like this:
    dateDimension between @Prompt('Enter date','D',,mono,free) and dateadd ( Month ,4, @Prompt('Enter date','D',,mono,free) )
    (I am using Sybase database syntax that's why I can use dateadd function.  You have to use the equivalent function depending on the database you are using).
    3. Back to WebIntelligence, in Query Editor, Pane Filter use this filter "Prompt Date + 4 months", instead of the condition you were using before
    4. Then you can use a function like
    =NumberOfMonth([Date Dimension])
    in the headers of your crosstab.

  • How to get last 24 months data (if user not enter any kind of information)

    Hi all,
    I am want a report such that
    1. if user does not enter months he has to get last 24 months data(from current month)
    eg1.
    Sales
    currentmonth     300
    currentmonth-1  400
    currentmonth-20 500
    2. if user  enter months he has to get required months data(from current month)
    eg1.assume that user entered the interval of last two months.
    Sales
    currentmonth     300
    currentmonth-1  400.
    friends please me in desinging this query.
    It's very urgent,waiting for responses.
    Thanks,
    James.

    Hi james,
    1. if user does not enter months he has to get last 24 months data(from current month)
    ANS: U have to create variable Of  Currentmonth with The following
             Process Type: SAP Exit
             Variable Represent: Single value
            Variable Entry: Optional
    Check chekboxes for <b>Ready for Input</b> & Can be change in Query navigation.
    b) After this u have to give offsets by restricting this variable
    2. if user enter months he has to get required months data(from current month)
    ANS:
    For this U have to use Process Type: User-exit( User Entry)
    & After that specify the offsets by restriction.
    Thanks,
    kiran.
    Message was edited by:
            kiran manyam

  • Get first and last date of month

    Hi,
      Is there any function module to get first and last date of month for a entered date.
    Please let me know.
    Regards,
    SP

    Hi,
    Use the below FM to find the Last day of month and them u can easily calculate the first day.
    DATA : v_startdate TYPE sy-datum.
    DATA : v_enddate TYPE sy-datum.
    DATA : v_temp TYPE dats.
    v_temp = sy-datum.
    CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
        EXPORTING
          day_in            = v_temp
        IMPORTING
          last_day_of_month = v_enddate
    CONCATENATE  v_enddate+0(6)  '01'  INTO  v_startdate.
    Hope it helps.
    Regards,
    Arnab.

  • When I look up the creation date for files on my Macbook I get the date and month in brackets, but not the year.  Why is this and how can I look up the year?

    When I look up the creation date for files on my Macbook (using "get info", or the information window in Iphoto) I get the date and month in brackets, but not the year.  Why is this and how can I look up the year? 

    Does the Date Modified column in a window set to List view show the date correctly, or does it also display it incorrectly?
    To add additional columns to a Finder (folder) window, with that window open and active open the View Options for it. You can do that by pressing Command-J or by selecting View Options from the View menu in the main menubar.

  • Get last august month from current date

    Hi,
    I need to get last august month from current date.
    e.g if current date is 1-OCT-2013 need to get last August date i.e.1-AUG-2013
    e.g. if current date is 1-MAY-2013 need to get last August date i.e.1-AUG-2012

    Something like this?
    SQL> WITH table_x AS(
      2     SELECT SYSDATE dt from dual UNION ALL
      3     SELECT TO_DATE('20-05-2013','dd-mm-yyyy') from dual
      4  )
      5  --
      6  ---
      7  --
      8  SELECT  dt,
      9    CASE
    10      WHEN (dt >= Add_Months(TRUNC(dt,'YEAR'),7)) THEN
    11          Add_Months(TRUNC(dt,'YEAR'),7)
    12      WHEN (dt < Add_Months(TRUNC(dt,'YEAR'),7)) THEN
    13          Add_Months(TRUNC(dt,'YEAR'),7) - 365
    14    END cs
    15  FROM table_x;
    DT        CS
    24-OCT-13 01-AUG-13
    20-MAY-13 01-AUG-12

  • Date minus (-) one month via formular

    Hello,
    I look for a BW formula to calculate a date - one month. At the moment I use the following formula but I'm not happy with this solution.
    IF( DATE_MONTH( CALDAY ) = DATE_MONTH( ADD_TO_DATE( LOAD_DATE, NEGATIVE( 15 ) ) ), WS_COUNT, 0 )
    Regards, Thomas

    Here's a go at it using a routine.  Not sure if the c's need to be i's for the calculations, so you may need to play around with it.  Also this code doesn't check for validity of the 29th, 30th, 31st dates (March 31 going back to Feb 31 is invalid).
    DATA: l_m1(2) type c,
              l_m2(2) type c,
              l_y(4) type c,
              l_d(2) type c,
              l_lastmonth like <date_field>.
    l_y    = <date_field>+0(4).   "first 4 characters = year
    l_m1 = <date_field>+4(2).   "5-6 = month
    l_d    = <date_field>+6(2).   "7-8 = day
    l_m2 = l_m1 - 1.   " get last month
    IF l_m1 = 0.         "check for january
       l_m1 = 12.
       l_y = l_y - 1.
    ENDIF.
    CONCATENATE l_y l_m1 l_d into l_lastmonth.   "rebuild date
    RESULT = l_lastmonth.
    It's a start and a direction, so take it as such and not as the correct solution because I don't really know your requirements or exactly what you are trying to do.
    Brian

Maybe you are looking for

  • How to find out Maximum date value in RPD.

    Hi All, I have a date column i want to get the maximum date value from that column. I am trying this expression MAX( "sales"."book"."date") in new logical column i am getting the RPD inconsistence error. Database is SQL server 2005. Is there any prob

  • Video streaming stalls in full screen mode

    I'm not sure to be in the right category, but my Laptop runs in Tiger and I happen to use video streaming from different websides like ESPN Live and other websides with their own players. I use even some that require a program dowload to be able to s

  • Direct purchasing of components for subcontracting flow

    Hi, I have following business scenario: I have Material A which I send to the subcontractor 123. The subcontractor adds component B and do some more transformations of the product. In the end I receive part C. Because of local tax requirements (Brazi

  • DB Adapter stops polling

    Hi, We have several processes which are initiated by a DB adapter polling a database table (oracle.tip.adapter.fw.agent.jca.JCAActivationAgent). Recently, the poller processes stopped activating for about a day, then started working again. When the p

  • Getting error message 2053 "This entry already exists in the following tab"

    Hi all i have a user form which is connected to UDO of type document which has a document line user table which is bounded to a matrix within the user form. when i add a new line to the matrix and press update it works fine. when i change a value in