Start Date of Week from Week Number

Hi
i need to get the start date of the week based on the week number e.g the start date of week
1 in 2008 would be 01 Jan and start date for week 2 would be 06 Jan and week 3 would be 13 Jan etc
Any advice would be great
Thanks
David

Checkout the java.util.Calendar API and its get/set/add methods.
An alternative is the great Joda Time API at sourceforge.

Similar Messages

  • Sched.start date not allowing on week-ends for fwd scheduling process order

    Hello Experts,
    For a process order & scheduling typr forward/in time if I take sat or sunday as a start date then if I click on schedule, system changes it to previous workin day (friday). But however if i select backward/in time scheduling type & put week ends as finish day then system does not change this date.
    How can I make system to allow schedule start date on week ends also for forward/in time scheduling type. in a factory calendor sat & sunday are holidays. while for work center, calender sat & sunday are marked as working days.
    Thanks for advance,
    Vijay.

    Hi
    it depends upon client requirement.you must have defined the holiday calender as well.if you select the public holidays in your factory calender.then system will allow you to do your daily transctions on public holidays as well and vice versa.so better go with all options selected .and plz check at your end
    plz revert back if it works
    Regards
    Anupam Sharma

  • How to tell date of manufacture from serial number or how to look up?also when were 1q524 introduce

    how to tell date of manufacture of 1q524 NC701AA-ABA from serial number or how to look up?
    when were they first introduced?

    dlkegarise
    See here for the release date. For the serial number the typical format is to have the 4th, 5th, and 6th characters to reference when the product was built.  The first character is the year date (Y) and the next two (WW), the week in that year it was made.
    CCSYWWZZZZ  
    Hope this helps you and anwsers your questions.  Regards.
    I work for HP. When your problem has been solved, accept the solution by clicking the "Accept as Solution" button to help other members in the future!

  • Align WO start date

    Hello,
    We have products which are booked together but require to assembled together in shopfloor and which required to be planned and release on same day. These products manufacturing lead times are different and vary based on the configuration of these products.
    Can someone help me out, how to plan by aligning the WO start on same day for dependent products.
    For E.g.:
    Product1 10 Days
    Product2 5 Days
    I would like to have same WO start date by offsetting from schedule ship date-Max Manu leadtime
    Thanks
    Edited by: user604737 on Nov 21, 2010 12:51 AM

    You can use the msc_release_hook to override the ASCP's start date during the release operation.
    But unless you firm the work orders, keep in mind that in the next plan run, you will get reschedule in/out messages for those work orders.
    Sandeep Gandhi

  • Week Start Date from Week Number

    How would I display the Week Start Date and Week Number for a range of dates.
    required output:
    weekno weekstartdate qty
    11 8/03/04 50
    12 15/3/04 100
    13 22/3/04 75 etc

    Do you have a start and end date and need it expanded to weeks ?
    Let's say you have a table that include both the start and end dates
    select to_char(ddate,'WW'), ddate
          from (select start_dt + rownum - 1 ddate
                  from user_objects,
                       (select min( START_DATE ) as start_dt,
                               max( END_DATE ) as end_dt
                          from MY_TABLE
                          WHERE .... )
                  where start_dt + rownum <= end_dt ) a
      where to_char(ddate,'D') = '1'
    /Of course, one of the problems with WEEK is interpretation. Week one does not start until the First Sunday of the year. Which may or may not be what you want

  • How to get the week start date from ISO week number

    Hi,
    I have a table with the following stucture
    Year    error    Week1     week2   week3 ......week53
    2012       error1     2           4         2             1
    2012       error2    3          0        1                 1I was hoping to get something like select year, error, week1||'Week start date which is a monday of that week' , week2||'Week start date,again monday',....week53 from table
    Any suggestions please?
    Thanks,
    Sun

    Hi, Sun,
    To see when week N started, add 7 * (N - 1) days to the beginning of the year. (By definition, the beginning of the ISO year is the start of week 1 of the ISO year.)
    To see when week 22 of the current year started:
    SELECT  TRUNC (SYSDATE, 'IYYY') + (7 * (22 - 1))
    FROM    dual
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using.
    See the forum FAQ {message:id=9360002}

  • Rollover 18 weeks starting from week number of current month

    Hi,
    I have a requirement as described below.
    Table Name Time:
    Columns: Fiscal Year, Fiscal Month and Fiscal Week
    above table has join with sales table and it contain sales data on week basis. so least granularity of data at week level.
    we have a report with columns fiscal year, actual sales and forcast sales. our requirement is to filter the data with following criteria.
    Current Month Filter
    Jan fiscal week between 1-18 of current year
    Feb fiscal week between 5-23 of current year
    March fiscal week between 9-27 of current year
    November fiscal week between week 44 of current year and week 10 of next year
    December
    so with above requirement we need to filter data with rollover 18 weeks starting from week number of current month
    I tried with timestampadd(sql_tsi_week, interval, week) but it's not working as I expacting. Please provide the code/logic to get it done.
    Appreciate your help.
    Thanks
    Jay.

    Jay wrote:
    I need to get rollover 18 week data at anypoint of time starting with week number of 1st of every month to 18 weeks. read my question again and you will be able to understand.You're kind of missing the point to be honest. It's very hard to answer specific questions without the required information. To answer a question like this we need a minimum of:
    1. Oracle version
    2. Sample data (CREATE TABLE / INSERT statements)
    3. Expected output
    4. Explanation of business rules.
    Alternatively, you can read the link in my original response.
    Please provide the required information and someone can help.

  • How to calculate start date of the week based on week number ?

    i need to get week number of the current date and based on that i need to calculate start date falling in the same week for last year.
    Eg. today is 31st week of year and 31st july date. so what will be the date on the 31st week of last year. i need the start date of that week.
    we can calculate the week number by select to_char(sysdate,'ww') from dual.
    DO we have a single line query for that or will it require writing a pl/sql block ?

    you can try following query
    it can be as inline but for more clean look and create it as select with include select
    with t as
    (select sysdate as dt from dual)
    select to_char(prev_year_dt - to_char(prev_year_dt, 'D') + 1, 'DD.MM.YYYY') as start_of_week from (select
    -- get day from prev year with the same week number
        case
               when to_number(to_char(add_months(dt, -12), 'WW')) > to_number(to_char(dt, 'WW')) then
                dt - (to_number(to_char(add_months(dt, -12), 'WW')) - to_number(to_char(dt, 'WW'))) * 7
               when to_number(to_char(add_months(dt, -12), 'WW')) < to_number(to_char(dt, 'WW')) then
                dt + (to_number(to_char(dt, 'WW')) - to_number(to_char(add_months(dt, -12), 'WW'))) * 7
               else
                add_months(dt, -12)
           end as prev_year_dt
      from t) t1good luck
    Sergii
    'Monday' is not first day of week in 100% ;)
    Edited by: Galbarad on Jul 30, 2012 11:00 PM

  • How do I change the start date for the week from Monday to Sunday on my iPhone 5?

    How do I change the start date for the week on iCal from Monday to Sunday on my iPhone5?

    Yes. On my new iPhone 5 the iCal week begins on a Monday not a Sunday and does not give me the option to edit in settings on the phone

  • Sums up the last 4 weeks from the start date

    Hi all,
    Pls tell me how to find the give issue with example
    How to write queri in SQL
    sums up the last 4 weeks from the start date selected (meaning range of date 1st to 7th) (the 4 weeks should stop on the 31st).
    Thanks & Regards

    <DIV><FONT size=2>
    <P><FONT size=2>select</FONT></FONT> tstdate, weeks, (sum*<FONT
    color=#0000f0>7</FONT>) as sum<BR>from <SPAN
    class=224524108-18042006>  </SPAN>(select to_date(<FONT
    color=#0000f0>'&date'</FONT>,<FONT color=#0000f0>'dd-mon-rrrr'</FONT>) as
    tstdate,<BR><SPAN
    class=224524108-18042006>                    
    </SPAN>last_day(to_date(<FONT color=#0000f0>'&date'</FONT>,<FONT
    color=#0000f0>'dd-mon-rrrr'</FONT>)) as weeks, <BR><SPAN
    class=224524108-18042006>                    
    </SPAN>floor((last_day(to_date(<FONT color=#0000f0>'&date'</FONT>,<FONT
    color=#0000f0>'dd-mon-rrrr'</FONT>)) - to_date(<FONT
    color=#0000f0>'&date'</FONT>,<FONT color=#0000f0>'dd-mon-rrrr'</FONT>))
    /<FONT color=#0000f0>7</FONT>) as sum <BR><SPAN
    class=224524108-18042006>          
    </SPAN>from dual)<FONT size=2></P></FONT></DIV>

  • Cannot select a Date in the 2nd week of any month from "Month View"

    Looking for some help with a strange problem that has started within the last day or 2. In Calendar, under the Month view, it will not allow me to select a date in the current week (or the second Week dates in ANY Month for that matter i.e. 6-8-08 thru 6-14-08, 8-3-08 thru 8-9-08, 4-6-08 thru 4-12-08). It skips from the 1st week of June (6-1-08 thru 6-7-08), to the 3rd and 4th weeks of June (6-15-08 thru the end of the month). It is like it is not recognizing where my finger is pointing. I can access the current week through the list view and day view, and it will allow me to post an event by choosing the current week in the add option, but will not let me pick that date to view it once it has been scheduled. The dot shows up, and it shows on list view, but cannot get to the date by selecting it in month view. That section of my phone screen will let me access other applications and recognize where I am touching, so I don't believe it is a sensor issue. I have tried rebooting, but it has not helped. Any ideas out there? Please let me know. Thank You! for any guidance.

    Clearwater Randy,
    If the screen is only not responding in that particular application, you may want to first do a reset. To reset, press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears.
    If that does not resolve your issue, try restoring in iTunes. To restore, connect your iPhone into iTunes and click Restore on the Summary page. Note: All of your information will be erased from the iPhone, so make sure to have a backup of important information on your computer before restoring.
    Hope this helps,
    Jennifer B.

  • Find first & last day of the week from given date

    Hi All,
    I have the below input query,
    WITH TEM AS   ( SELECT '11-JAN-13' DT from dual union   SELECT '16-JUN-12' from dual union   SELECT '04-JUL-12' from dual union   SELECT '09-JAN-13' from dual union   SELECT '10-JAN-13' from dual union   SELECT '04-JAN-13' from dual union   SELECT '07-JAN-13' from dual union   SELECT '04-JUN-13' from dual union   SELECT '08-JAN-13' from dual )  SELECT TO_DATE(DT) D1,'WEEK '||TO_CHAR(TO_DATE(DT),'IW-YYYY') WK from tem;
    I would like to get the below output i.e. Starting date of the week(Saturday) & end date of the week(Friday)
    DT
    WEEK Period
    Max Date in this week
    Min Date in this week
    16-Jun-12
    WEEK 24-2012
    16-Jun-12
    22-Jun-12
    04-Jul-12
    WEEK 27-2012
    30-Jun-12
    06-Jul-12
    04-Jan-13
    WEEK 01-2013
    04-Jan-13
    29-Dec-12
    07-Jan-13
    WEEK 02-2013
    05-Jan-13
    11-Jan-13
    08-Jan-13
    WEEK 02-2013
    05-Jan-13
    11-Jan-13
    09-Jan-13
    WEEK 02-2013
    05-Jan-13
    11-Jan-13
    10-Jan-13
    WEEK 02-2013
    05-Jan-13
    11-Jan-13
    11-Jan-13
    WEEK 02-2013
    05-Jan-13
    11-Jan-13
    04-Jun-13
    WEEK 23-2013
    01-Jun-13
    07-Jun-13
    Also suggest if any function available in oracle for this one.

    Like this? I think in your required output, 3rd row data, MAX_DATE should be 29-DEC-12 and MIN_DATE should be 04-JAN-13.
    WITH TEM AS 
    ( SELECT '11-JAN-13' DT from dual union 
    SELECT '16-JUN-12' from dual union
    SELECT '04-JUL-12' from dual union
    SELECT '09-JAN-13' from dual union
    SELECT '10-JAN-13' from dual union 
    SELECT '04-JAN-13' from dual union
    SELECT '07-JAN-13' from dual union
    SELECT '04-JUN-13' from dual union
    SELECT '08-JAN-13' from dual )
    SELECT D1 DT,
           WK WEEK_PERIOD,
           CASE WHEN (TRIM(TO_CHAR(D1,'DAY'))='SATURDAY') THEN D1
                 ELSE NEXT_DAY(D1,'SATURDAY')-7
            END AS MAX_DATE_IN_THIS_WEEK,
          CASE WHEN (TRIM(TO_CHAR(D1,'DAY'))='FRIDAY') THEN D1
                ELSE NEXT_DAY(D1,'FRIDAY') END AS MIN_DATE_IN_THIS_WEEK
    FROM (
    SELECT TO_DATE(DT) D1,'WEEK '||TO_CHAR(TO_DATE(DT),'IW-YYYY') WK from tem)
    ORDER BY DT;
    OUTPUT:
    DT        WEEK_PERIOD  MAX_DATE_ MIN_DATE_
    16-JUN-12 WEEK 24-2012 16-JUN-12 22-JUN-12
    04-JUL-12 WEEK 27-2012 30-JUN-12 06-JUL-12
    04-JAN-13 WEEK 01-2013 29-DEC-12 04-JAN-13
    07-JAN-13 WEEK 02-2013 05-JAN-13 11-JAN-13
    08-JAN-13 WEEK 02-2013 05-JAN-13 11-JAN-13
    09-JAN-13 WEEK 02-2013 05-JAN-13 11-JAN-13
    10-JAN-13 WEEK 02-2013 05-JAN-13 11-JAN-13
    11-JAN-13 WEEK 02-2013 05-JAN-13 11-JAN-13
    04-JUN-13 WEEK 23-2013 01-JUN-13 07-JUN-13
    9 rows selected.

  • Calendar week: how to substract a number of calendar weeks from a given one

    Hi Experts,
    Is there a way to calculate this:
    If my calendar week is 01.2009 and I want to calculate the corresponding week 18 weeks ago, is there a FM that calculates this?
    I tried 01.2009 - 18 but is giving me the wrong week.
    Thanks in advance.
    Inma

    DATA : GV_MONDAY TYPE D,
           GV_DATES  TYPE I,
           GV_WEEK   TYPE KWEEK.
    PARAMETERS: P_WEEK  TYPE KWEEK DEFAULT '200901',
                P_WEEKS TYPE I.
    START-OF-SELECTION.
      CALL FUNCTION 'WEEK_GET_FIRST_DAY'
        EXPORTING
          WEEK         = P_WEEK
        IMPORTING
          DATE         = GV_MONDAY
        EXCEPTIONS
          WEEK_INVALID = 1
          OTHERS       = 2.
      IF SY-SUBRC  0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      GV_DATES = P_WEEKS * 7.
      GV_MONDAY = GV_MONDAY - GV_DATES.
      CALL FUNCTION 'DATE_GET_WEEK'
        EXPORTING
          DATE              = GV_MONDAY
       IMPORTING
         WEEK               = GV_WEEK
       EXCEPTIONS
         DATE_INVALID       = 1
         OTHERS             = 2
      IF SY-SUBRC  0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      WRITE :/ P_WEEK, '-', P_WEEKS , ': =', GV_WEEK.
    Regards,
    Shafivullah Mohammad
    Edited by: shafivullah mohammad on Jul 9, 2009 12:44 PM

  • How to calculate start date and last date for current week

    Dear All.
    i want to calculate the start of the current week as well as the last date of the current week, our week start from Saturday and ends of Friday i.e. Saturday is the first day of the week and Friday is the last day of the week.
    How can i acheive this in universe Designer?.
    Please help...

    Hi
    the formulas in webi will be as follows
    for startdate
    =RelativeDate(LastDayOfWeek(CurrentDate());-8)
    for enddate:
    =RelativeDate(LastDayOfWeek(CurrentDate());-2)
    Regards,
    Ranganath

  • Get weeks based on start date

    Hi ,
    i need a query that will determine the weeks based on start date.
    if the table consists of:
    vDate vAmount
    06/25/2007 100
    06/27/2007 200
    07/04/2007 400
    If one enters start date as 6/25/2007 , amounts should be broken out in 7 day increments.
    Result should be
    week1 300
    week2 400
    where week1 should be from 6/25/2007 to 07/01/2007,
    week2 should be from 07/02/2007 to 07/08/2007
    and start date is not always on a Monday or Sunday...
    any idea?
    thanks in advance

    try this...
    SQL> with rt as
      2  (select 'week'||(trunc(l/7,0)+1) wk_no,to_char(trunc(sysdate)+l,'dd-Mon-yyyy') dt,to_char(trunc(sysdate)+l,'Day') "Day" from
      3  (select level-1 l from dual connect by level <= 367) where trunc(sysdate) between trunc(sysdate) and add_months(trunc(sysdate),12)),
      4  xx as
      5  (select '06/25/2007' vdate, 100 vamount from dual union all
      6  select '06/27/2007', 200 from dual union all
      7  select '07/04/2007', 400  from dual)
      8  select wk_no,sum(vamount) from
      9  (select (select wk_no from rt where dt = to_date(vdate,'MM/DD/YYYY')) wk_no,vamount from xx)
    10  group by wk_no;
    WK_NO                                        SUM(VAMOUNT)
    week1                                                 300
    week2                                                 400
    SQL>
    SQL> select 'week'||(trunc(l/7,0)+1) wk_no,to_char(trunc(sysdate)+l,'dd-Mon-yyyy') dt,to_char(trunc(sysdate)+l,'Day') "Day" from
      2  (select level-1 l from dual connect by level <= 367) where trunc(sysdate) between trunc(sysdate) and add_months(trunc(sysdate),12);
    WK_NO                                        DT          Day
    week1                                        25-Jun-2007 Monday
    week1                                        26-Jun-2007 Tuesday
    week1                                        27-Jun-2007 Wednesday
    week1                                        28-Jun-2007 Thursday
    week1                                        29-Jun-2007 Friday
    week1                                        30-Jun-2007 Saturday
    week1                                        01-Jul-2007 Sunday
    week2                                        02-Jul-2007 Monday
    week2                                        03-Jul-2007 Tuesday
    week2                                        04-Jul-2007 Wednesday
    week2                                        05-Jul-2007 Thursday
    .

Maybe you are looking for

  • Rack mount kit - WLC 2100

    What's the Part Number for the Cisco WLC 2100 rack mount kit? Thanks in advance.

  • Unable to create wage types in It0015 for Zambia

    Hi Friends, I want to create Wage types in IT0015 - Additional Payments for Zambia. But I am unable to find any model wage types which can be copied to create the custome wage type for country grouping ZM - Zambia. I also tried to copy the wage typse

  • WD ALV  read only property

    Hi, Is there a read only property for the cell editor in the ALV table? (I prefer it to the enabled/disabled) visually. Many thanks!

  • Looking for Printer Test program

    I'm trying to find an ABAP program that will let me test out whether we have printers defined in SAP correctly.  Ideally the functionality I'm looking for would be an ABAP program that when run would display a list of all the printers defined in SPAD

  • Compressor settings for HDV 1080i50?

    hi, i have to export 1h30 of HDV 1080i50 to make it play on a dvd. could you, please give me some suggestions how to make this?