Date find from year of week.

Hi all,
I have week number values of the year, ie values are ranging from 1-52.
i want to find out start and end dates of the week. do we have any functions provided by oracle to achieve this.
Please help me.

how about this
change level <53 so you will get it for all 52 weeks
  1   select  level Week_no,
  2              trunc(sysdate,'Y')+(7*(level-1)) Statrt_date
  3*             ,(trunc(sysdate,'Y')+(7*(level-1))+6)End_date from dual connect by level<10
SQL> /
   WEEK_NO STATRT_DA END_DATE
         1 01-JAN-07 07-JAN-07
         2 08-JAN-07 14-JAN-07
         3 15-JAN-07 21-JAN-07
         4 22-JAN-07 28-JAN-07
         5 29-JAN-07 04-FEB-07
         6 05-FEB-07 11-FEB-07
         7 12-FEB-07 18-FEB-07
         8 19-FEB-07 25-FEB-07
         9 26-FEB-07 04-MAR-07
9 rows selected.
[pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Date find from week of year.

    Hi all,
    I have week number values of the year, ie values are ranging from 1-52.
    i want to find out start and end dates of the week. do we have any functions provided by oracle to achieve this.
    Please help me.

    date find from year of week.

  • Get week ending date from Year and Week Number

    I would like to display the week ending date in a Report.
    My dataset query has grouped the results by year and week number, so I am trying to construct the week ending date from year and week number.

    Week end date can be got as below
    =DateAdd(DateInterval.WeekOfYear,CInt(Fields!WeekNumber.Value) -1,DateAdd(DateInterval.Year,(Cint(Fields!Year.Value) - 1900),CInt("12/31/1899")))
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Find date if year, month, week and day is given

    Hi,
    How to find the date, if year, month, week and day is given?
    For example:
    Given, year - 2010, month - 03, Day - Wednesday, Week - 3,
    Then how can we get the date as 17-Mar-2010.
    Thanks,
    Chris

    with dt_tbl as (
                    select  2010 year,
                            3 month,
                            3 week,
                            'Wednesday' day
                      from  dual
    select  trunc(to_date(year || '-' || month || '-01','yyyy-mm-dd'),'iw') + (week - 1) * 7 +
              case day
                when 'Monday' then 0
                when 'Tuesday' then 1
                when 'Wednesday' then 2
                when 'Thursady' then 3
                when 'Friday' then 4
                when 'Saturday' then 5
                when 'Sunday' then 6
              end dt
      from  dt_tbl
    DT
    17-MAR-10
    SQL> SY.

  • Monday Date from Year Week

    Is there a way to derive the date for a Monday given the Year and Week. For example, given 200723 the result would be 06/04/2007.
    Jeff

    SQL> select param,
      2         next_day(to_date(substr(param,1,4)||'0101','YYYYMMDD')-decode(to_char(to_date(substr(param,1,4)||'0101','YYYYMMDD'),'IW'), 1,7,0),'MONDAY')
      3         + (7*to_number(substr(param,5)-1)) output
      4  from (select 200723 as param from dual
      5        union all
      6        select 200701 as param from dual
      7        union all
      8        select 200752 as param from dual
      9        union all
    10        select 200623 as param from dual
    11        union all
    12        select 200601 as param from dual
    13        union all
    14        select 200652 as param from dual);
        200723 04-JUN-07
        200701 01-JAN-07
        200752 24-DEC-07
        200623 05-JUN-06
        200601 02-JAN-06
        200652 25-DEC-06
    6 rows selected.
    SQL> Nicolas.

  • How to find compensation data for the year

    Dear All,
    Scenario:
    A company wants to know the comepnsation data for financial year 2009-2010.
    Problem: I couldnot find a single report which can provide the compensation of an employee for the year.
    We are trying to build a report however needs input if anyone has done that:
    Table which stores this data is PS_COMPENSATION.
    Problem is : it stores data in effective date.
    How to then convert it into a year -April 2010 to March 2011
    For example: cases
    a. existing employee: whose effective comp data will be less than April 2010
    - Plus, there are pay rate changes between April 2010 to march 2011. (Pay rate change can happen on any date of the month)
    - How can I add them to find the Compensation as per comp page from 1st April to 31st march 2011

    I'm afraid what you're looking for is not likely to be a trivial task. If you have all of the modules required for the "Report Total Compensation" product, then you should take a look at the associated PeopleBook. I think you will have to be on HRMS 9.0 at a minimum, and using Payroll for North America and Benefits Administration.
    To create a custom solution, you may have to consider a variety of other factors such job status--leave, terminated, terminated with pay, etc.--hourly vs. salaried, part time vs. full time, multi-job, variable compensation. It will depend entirely on the specific features that are being used at your site.
    If you provide a very detailed example of the output you are looking for with sample data, someone might be willing to offer a solution.
    Regards,
    Bob

  • Oracle reverse date : inupt (number of the week, number of the date, year)

    Hi experts,
    *I have a date that has been stored in three separated columns in a oracle data base 10g:
    -number of week: for example 30. (range 1-53)
    -number of the day: for example 5. (range 1-7).
    -year : for example 2010.
    *i need to write a SQL code which concate and convert this three columns to one signle date in the format dd/mm/yyyy.
    *This a concrete example:
    -input:
    number of the day: 2, number of the week :23, year 2010.
    -ouput:
    07/06/2010
    Any idea will be welcome
    Best regards.

    Hi,
    Here's one way :
    alter session set nls_date_language = "english";
    alter session set nls_territory = "america";
    WITH date_parts AS (
    select 2010 yr, 23 wk, 2 dy from dual union all
    select 2010 yr, 39 wk, 2 dy from dual
    SELECT next_day(to_date('0101'||yr,'DDMMYYYY')-7, 'SUN') - 1
           + 7*wk
           + dy
           AS dt
    FROM date_parts;You might have to make some adjustments due to your nls settings.

  • Creating a fiscal date table that includes Day of Year and Week of Year column

    Hi,
    Our fiscal year runs between 1st October through to 30th September and I'm trying to create a date table that I can use to represent this in Powerpivot (I'm using Excel 2013). I had no probably creating columns for Fiscal month or fiscal year, however I am
    having issue breaking it down more than that, specifically I cannot work out how to calculate:
    - day of the year
    - week of the year (with week one starting on the first day of the year rather than the first Monday)
    I worked out how to do the day of the year until I had to try and account for leap years which broke the formula I had! Can anyone please recommend solutions, I cannot see anything online about this. Obviously I know that it is simple to do this for a normal
    calendar year but this approach doesn't work with a custom fiscal year.
    Whilst it is useful for several reasons, my main reason for wanting week is so that I can plot my Pivotcharts more smoothly (although I may have missed an easier way to do that).
    Thanks,
    James

    For my example I started with 1 column in Power Pivot called [Date]
    I created the following Columns
    [DayofMonth] =Day([Date])
    [MonthNumber] =Month([Date])
    [Fiscal Year] =IF([MonthNumber]< 10, Year([Date]), (Year([Date])+1))
    [Fiscal Day] =[Date] - DATE(([Fiscal Year] -1), 10,1) +1
    [Fiscal Week] =RoundUp([Fiscal Day] / 7, 0)
    Change [Date] to whatever your date column is and those DAX formulas will get you what you need

  • How to find the data loaded from r/3 to bw

    hi
    how to find the data loaded from r/3 to bw is correct . i am not able to find which feild in the query is connected to which feild in the r/3 . where i am geting the data from r/3 . is there any process to find which feild  and table the data is comming from . plz help
    thanks in advance to u all

    Hi Veda ... the mapping between R/3 fields and BW InfoObjects should take place in Transfer Rules. Other transformation could take place in Update Rule.
    So you could proceed this way: look at InfoProvider Data Model and see if the Query does perform any calculation (even with Virtual keyfigures / chars). Than go back to Update Rules and search for other calculation / transformation. At least there are Tranfer Rule and eventually DataSource / Extraction Enhancements.
    As you can easily get there are many points where you have to look for ... it's a quite complex work but very usefull.
    Once you will have identified all mappings / transfromation see if BW data matchs R/3 (considering calculations ...)
    Good job
    GFV

  • How to find from which table we got the data

    Hi friends ,
    How can we find from which table we r getting data in the datasource.
    I am getting data from crm system.based on that we created cubes and dsos.
    we have only one datasource.now i need to know from which table we pull the data?
    can any one give the procedure
    Thanks in advance........
    sridath

    Hi,
    Datasource / tables in the source system
    Go to RSA2 (DS Repository) in your source system and display your source system.
    If Extraction Method is 'V' - you are lucky and you see table name where data is taken from.
    If it is F* - function module is used, and you have to go thru its code to see all the tables it uses and logic how data is
    processed.
    Ext. Meth   Short text                                                                               
    V                 Transparent Table or DB View                
    D                  Fixed Domain Value                          
    F1                Function Module (Complete Interface)        
    F2                Function Module (Simple Interface)          
    Q                 Extraction Using ABAP Query                 
    A                 DataSource Append                           
    OR
    Since you have the extract structure and the extractor, you must have some transaction like the Extractor Checker RSA3. If so
    then execute ST05, switch on the trace and execute the extractor checker. Once the extractor checker presents the results
    switch off trace. The clcik on Display trace and you will see all the tables that were hit by the extractor checker to
    retrieve data and present it to you.
    Hope this helps.
    Thanks,
    JituK

  • Data Retrieval speed from DIAdem Database using Data Finder Toolkit in LabVIEW

    I have developed a LabVIEW code using NI Data Finder toolkit for extracting the data from the DIAdem. I have formed queries for extraction the data. But the data retrieval takes more time for extracting the data.
    I have attached my LabVIEW code image along with this post. In that i have circled the VI "Results to Waveform", which is Data Finder toolkit VI which takes more time for extraction. From my Testing, query formation is taking only few millisecond to execute, but "Results to Waveform.vi" takes around 35 seconds. Also i want to execute similar kind of search for 5 times. Altogether it will taken around 1.5 mins to 2 mins for execution.
    Is there any other alternative way of doing this search? Kindly help me in sorting this out.
    Thanks,
    Alagar 
    Solved!
    Go to Solution.
    Attachments:
    Report Gen.JPG ‏91 KB

    Hi Alagar,
    You say that the "Results to Waveform.vi" takes "more" time, but what are you comparing this to?  More than what?  More than loading the contents of the same file with the TDMS VIs or with the Storage VIs?  What file format are you loading data from after querying-- TDMS files, ASCII files, binary files?
    What information do you want to retrieve?  Do you really need ALL the values of ALL the channels in each data file?  Are you interested only in the channel values, or all you interested in scalar properties stored along with the data?  If you want only some of the channels loaded or if you want only scalar properties loaded, there are indeed faster ways of doing this.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Function Module to find the Begin Date of the Year

    Hi Experts,
    Could you let me know if there is a FM to find the "Begin Date of the Year".
    I appreciate your help.
    Thanks a lot.

    Hi,
    Do you want the Begin date of the <b>current</b> year..Try this..
    DATA: V_DATE TYPE SY-DATUM.
    V_DATE = SY-DATUM.
    V_DATE+4(4) = '0101'.
    WRITE: / 'Beginning date of the year ' , v_date.
    If you are mentioning about the Fiscal year..Then you can use the FM PERIOD_DAY_DETERMINE
    Thanks,
    Naren

  • Find data type from value

    Hi,
    I want to find data type from its value.
    Ex- If value = 1234 then its data type is numeric.
          If value = ABCD then its data type is char.
    So is there any FM which can tell the data type from its value or any way to do it.
    Moderator Message: Offering points is against forum RoE. 
    Regards,
    Ashish Gupta
    Message was edited by: Suhas Saha

    Hai.
    check this.
    the five non-numeric types (text field (C), numeric text field (N), date field (D), time field (T), and hexadecimal field (X)), there are three numeric types, used in ABAP to display and calculate numbers. Data type N is not a numeric type. Type N objects can only contain numeric characters (0...9), but are not represented internally as numbers. Typical type N fields are account numbers and zip codes.
    integers - type I
    The value range of type I numbers is -2*31 to 2*31-1 and includes only whole numbers. Non-integer results of arithmetic operations (e.g. fractions) are rounded, not truncated.
    You can use type I data for counters, numbers of items, indexes, time periods, and so on.
    Packed numbers - type P
    Type P data allows digits after the decimal point. The number of decimal places is generic, and is determined in the program. The value range of type P data depends on its size and the number of digits after the decimal point. The valid size can be any value from 1 to 16 bytes. Two decimal digits are packed into one byte, while the last byte contains one digit and the sign. Up to 14 digits are allowed after the decimal point. The initial value is zero. When working with type P data, it is a good idea to set the program attribute Fixed point arithmetic.Otherwise, type P numbers are treated as integers.
    You can use type P data for such values as distances, weights, amounts of money, and so on.
    Floating point numbers - type F
    The value range of type F numbers is 1x10*-307 to 1x10*308 for positive and negative numbers, including 0 (zero). The accuracy range is approximately 15 decimals, depending on the floating point arithmetic of the hardware platform. Since type F data is internally converted to a binary system, rounding errors can occur. Although the ABAP processor tries to minimize these effects, you should not use type F data if high accuracy is required. Instead, use type P data.
    You use type F fields when you need to cope with very large value ranges and rounding errors are not critical.
    Using I and F fields for calculations is quicker than using P fields. Arithmetic operations using I and F fields are very similar to the actual machine code operations, while P fields require more support from the software. Nevertheless, you have to use type P data to meet accuracy or value range requirements.
    C ---> character
    D ---> date
    P ---> packed
    T ---> time
    X ---> hexadecimal
    I ---> integer.
    N ---> Muneric.
    Possible ABAP/4 data types:
    C: Character.
    D: Date, format YYYYMMDD.
    F: Floating-point number in DOUBLE PRECISION (8 bytes).
    I: Integer.
    N: Numerical character string of arbitrary length.
    P: Amount or counter field (packed; implementation depends on hardware platform).
    S: Time stamp YYYYMMDDHHMMSS.
    T: Time of day HHMMSS.
    V: Character string of variable length, length is given in the first two bytes.
    X: Hexadecimal (binary) storage.
    regards.
    sowjanya.b.

  • Finding the number of weeks or months in a Date range

    I have a couple of text boxes that a user inputs a start date and an end date. What I want to know is there a way to tell the number of months or the the number of days in this date range?
    For example:
    Start Date = 02/12/2004
    End Date = 03/12/2004
    The number of weeks = 4 //May not be accurate, just showing an example.
    The number of months = 2

    For month, I would define it as the dates that fall in the actual calendar month. If my start date input from the user is 1/21/04, then I want to define a time period of 1/21/04 through 1/31/04 to be included in the first month. I know that it is not an actual month, but I am trying to make graphs based on monthly performance.
    For weeks, I want the days to run Sunday through Saturday. If the first date starts on a Wednesday, then I want my first week to include days only Wednesday through Saturday.

  • Is there is any way to find the data transfer from client to Configuration Manager for health monitoring and hardware Inventory

    Hi
    Can Configuration Manager provide a way to find the data transfer from client to Configuration Manager for health monitoring and hardware Inventory. How can I know what amount of data is consumed during that process

    Place archive_reports.sms in %systemroot%\ccm\inventory\temp\ for both 64-bit and 32-bit computers.
    There are two situations where you can use this depending on the type of client:
    1. To keep inventory reports on a client (that is not an MP), create the following file:
    %systemroot%\ccm\inventory\temp\archive_reports.sms
    2. To keep inventory reports on a MP (that is also a client), create the following file:
    <x>:\sms_ccm\inventory\temp\archive_reports.sms
    The XML file will be saved in the inventory\temp folder.
    More information on the above here: http://blogs.technet.com/b/configurationmgr/archive/2012/09/17/controlling-configuration-manager-2012-using-hidden-files.aspx

Maybe you are looking for