Weekending date

We want a report that shows the number of opportunities a week. Unfortunately what management wants to see is a Date (it may be Friday or Saturday or Sunday) and not the week 1, 2, etc. Is there a way we can do it.

Add the following formula in the column to your report and check it out. If all goes well, it is what you are looking for.

Max (Date.Date by Date." Calendar week/year")

Date. ("' Calendar week/year") can be replaced by Date. "" Fiscal week / year.

See you soon

Tags: Oracle

Similar Questions

  • Hide weekend Dates


    How can I use the (#DayofWeek (datefield) # NEQ 1 or 7) on the loop following code to remove (no display) weekend dates?

    Gotcha Phil, I misunderstood.

    Anyway, here's the code that worked for my loop:









  • request for weekending date (friday) using any day in a week

    Hello

    I need to get the date for the date in a week end of week. ex: If gl_date = 17/04/2013 then based on this date date for weekending should generate and it should be Friday of that week that is, 19/04/2013

    How can I write query for that?

    Thank you for your help.

    Next_day
    http://docs.Oracle.com/CD/B19306_01/server.102/b14200/functions093.htm

    SELECT NEXT_DAY('02-FEB-2001','TUESDAY') "NEXT DAY"
         FROM DUAL;
    
    NEXT DAY
    -----------
    06-FEB-2001
    

    Published by: Ramin Hashimzadeh on April 18, 2013 22:40

    Published by: Ramin Hashimzadeh on April 18, 2013 22:40

  • Search weekend Dates through query

    I'm setting up a report in the APEX to show all the JEs which have been posted on the weekends. I can query all GL records and adjust the date, but I have no odea how to identify the dates that fall on Saturday or Sunday and. We run EBS 11i. I can send the basic query if that helps.


    Any help would be appreciated.

    Assuming that 'weekend' always means Saturday and Sunday and that your sessions always use English NLS settings,

    SELECT *
      FROM your_gl_table
     WHERE TO_CHAR( journal_entry_date, 'fmDAY' ) IN ('SATURDAY', 'SUNDAY' );
    

    or

    SELECT *
      FROM your_gl_table
     WHERE TO_CHAR( journal_entry_date, 'D' ) IN ('1' '7' );
    

    Justin

  • function/SQL to get the next weekend date of SUNDAY, in light of the current sysdate

    Hi all

    someone at - it a reliable piece of SQL or the function that takes the current SYSDATE as a parameter and returns the next date available weekend (SUNDAY)

    So for example if it is adopted as of today 01/07/2009 (Wednesday) it returns data 07/05/2009, which is the Date of Sunday following.

    Even if I went to Sunday 07/05/2009, it would go back the date 07/12/2009, which is this Sunday.

    Any help in advance apppreciated!

    Kind regards
    Satnam
    select next_day(sysdate, 'SUNDAY') from dual
    

    Good luck

  • Display the Date weekending

    Hello

    I have a requirement based on the year and month of the appeal, it must a list me of all the dates weekending as you please suggest me how to get this information

    For example: If we adopt 2015 March

    It should display 7-mar-2015

    14 -mar-2015

    21 -mar-2015

    28 -mar-2015

    Thank you

    Sudhir

    Hello

    It depends on what is a "weekending Date."

    If you want a list of all Saturday during a given month, then

    WITH got_month_wanted AS

    (

    SELECT TO_DATE ('MARCH 2015', "YYYY MONTH") AS month_wanted

    OF the double

    )

    got_saturday AS

    (

    SELECT ADD_MONTHS (month_wanted, 1) AS next_month

    , NEXT_DAY (month_wanted - 1).

    , 'SAT '.

    ) + (7 * (LEVEL - 1)) AS Saturday

    OF got_month_wanted

    CONNECT BY LEVEL<= 5 ="" --="" no="" month="" has="" more="" than="" 5="">

    )

    SELECT the Saturday

    OF got_saturday

    WHERE the Saturday<>

    ;

    This assumes that NLS_DATE_LANGUAGE = ENGLISH.

    If you can not be sure of NLS_DATE_LANGUAGE, then the request should be changed a little, but only a little.

    If you need to do this (or things like that) more than once, it must create a calendar table, which contains a line for each day where you might be interested.  See Re: function from PL/SQL to calculate non-working days

  • Dashboard prompt: display current Date earlier this week on the top in the list of choices to obiee

    Hello

    I develop a relationship where we have a requirement to indicate the start date of the week current on top in the drop-down list.

    The start date of the week is Sunday, March 10, 2013 "and Saturday weekend date is 17 March 2013", it comes directly from the source and now when I ordered it to be, goes to the week of the
    2015 or 1950 from the desc or asec.

    I want to display the start date of the current week as the default display using the dash prompt and I need digital week, I need the date: I do not have access RPD to set the variable repository.

    For example week start date (18/03/2013 and end date of week 23/03/2013), it should be dyanamic were based on the current date, it must default to this week to start and end date. Please let me know your inputs.

    Thanlks

    Try this at the prompt of-> see the-> SQL results

    SELECT Time.Date FROM 'SA' where week (Time.Date) = week (current_date) and year (Time.Date) = year (current_date)
    order of Time.Date

    If brand aid

    Published by: Srini VIEREN on March 18, 2013 21:18

  • How to get the date of end of week max and its rows of a table

    Hello
    Table [temp2]
     
       id          name        dt
      123        a             2-mar-2010
      124        b            1-feb-2010
      125        c             3-apr-2010
      123        a             13-mar-2010
      125        c             13-mar-2010
      123        a             12-feb-2010
     
    This table how to get this line by id - name (id and the name of the composite key) whose date is the date of last weekend (last Saturday).
    for example, suppose to have IDs 123 values date February 12, 2010, 13-mar-2010 this date falls on the last Saturday 13-mar-2010, how to get the value of the line on Saturday last for all the unique id and the name?

    So I wrote this but probably there a few traps...
    select id,name,dt from (select id,name,dt,max(dt) over(partition by id,name) as 
    max_date from temp2) t where dt=t.max_date and dt in ('3-apr-2010'
    ,'27-mar-2010','20-mar-2010','13-mar-2010')
    Here I have spent in the in clause 4 last weekend dates manually (although either has been calculated by programming) in front.
    Thank you

    Here's another option:

    SELECT     *
    FROM
    (
         SELECT     ID
         ,     NAME
         ,     MAX(CASE WHEN TO_CHAR(DT,'DY','NLS_DATE_LANGUAGE=ENGLISH') = 'SAT' THEN DT END) AS DT
         FROM     TEMP2
         GROUP BY ID, NAME
    )
    WHERE DT IS NOT NULL
    

    It is always useful to provide the following information:

    1. oracle version (SELECT * FROM V$ VERSION)
    2. examples of data in the form to CREATE / INSERT commands.
    3. expected results
    4 explanation of the expected results (alias "business logic")
    5. use.

     tags for #2 and #3. See FAQ (Link on top right side) for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    
  • Time machine and old files

    I run two external drives for Time Machine.

    An external HD to store the files got somehow deleted.  He had a lot of old customer files.

    Time Machine only allows me to look at the files around the age of 2 months.

    Is it possible to recover?

    Is there a way to keep old files?

    Taz - d wrote:

    I run two external drives for Time Machine.

    An external HD to store the files got somehow deleted.  He had a lot of old customer files.

    Time Machine only allows me to look at the files around the age of 2 months.

    Is it possible to recover?

    Is there a way to keep old files?

    Do you mean the file exist in Time Machine - or that they were on a non-time drive machine.

    Time machine is not for permanent backup of the files you want to delete from your hard drive - daily backups are consolidated/cleaned in weekly backups - so if you had a file in the middle of the week - then deleted before the end of the week - time machine will not it also on the weekend date, the file did not exist on the hard disk.

  • During the week to Daily Record Explosion?

    Hello

    I'm looking for a way to take a set of documents stamped with a weekend date and explode in a recordset for each day of this week. The data of the entire file would be identical, except for the date column. Here is an example.
    item_id  week_end_date   some_value
    1        2009-12-05      5
    1        2009-12-12      10
    1        2009-12-19      15
    2        2009-12-05      20
    2        2009-12-12      25
    2        2009-12-19      30
    What I want on the other end is something like this (I'll do only the first two records from above). I put an asterisk on the 'source' folder
    item_id  week_end_date   some_value
    1        2009-11-29      5
    1        2009-11-30      5
    1        2009-12-01      5
    1        2009-12-02      5
    1        2009-12-03      5
    1        2009-12-04      5
    1        2009-12-05      5*
    1        2009-12-06      10
    1        2009-12-07      10
    1        2009-12-08      10
    1        2009-12-09      10
    1        2009-12-10      10
    1        2009-12-11      10
    1        2009-12-12      10*
    I know I could do with a PL/SQL loop, but I am interested in more than one pure solution of SQL.

    My thought was to do a temp of sorts with 7 rows table and a column. It would basically be numbers between 0 and -6. Then in my SQL I assemble and simply add the value of the temporary table to the week_end_date blew up the records on. I would like to know if I'm crazy or on the right track. If I'm heading in the right direction, I would need a little help with the implementation.

    Thanks in advance.

    Hello

    Welcome to the forum!

    You have the right idea, with a table 7-row 1-column, but there is no need to create an actual table.
    You can use a subquery, as cntr below, created within the application itself and then join the result set of the subquery as if it were a table:

    WITH     cntr     AS
    (
         SELECT     LEVEL - 1     AS n
         FROM     dual
         CONNECT BY     LEVEL <= 7
    )
    SELECT     item_id
    ,     week_end_date - n     AS a_date
    ,     some_value
    FROM          table_x
    CROSS JOIN     cntr
    ;
    

    In Oracle, it is rarely necessary to create temporary tables.

  • Get all Sundays a month

    Hello

    I have a project where I have to generate a report based on the week ending Sunday for a month. In my PB, I have a column of weekend dates. I'm really confused about how to get the date for all Sunday for a given month, the Pb of query on the same dates and display the data in a report as a format excel with each column being a week ending date and the ranks under this column has data for this weekend.

    Help, please.

    Thank you

    Use dayofweek 1 day of the month.

    Then add the exact number of days to get the first Sunday. Start a list of dates with this date.

    Continue to add 7 days and the list adding until you reach the end of the month.

    This is the easiest part.

    For the rest, according to the data that you select, you can either do a query of fantasy that ends with your dates of arrival as a column alias,
    or
    run a normal query, reorganize in a table and the output array.

  • Formula for the due invoice weekends out of date

    HI - I want to be able to follow when a Bill is due. I have a column of dates have charged customers but I want to work when the 30 days is up off weekends. I would also like it show when it is received, and if it is still ongoing when I change the billing date.

    Hi wrightypantz,

    A calendar to illustrate the NETWORKDAYS function

    Weekends are excluded days of work. You can add an optional list of national holidays.

    See the numbers > help > formulas and functions help http://help.apple.com/functions/mac/5.0/#/ffa55b18db

    A list of more realistic Bill:

    Kind regards

    Ian.

  • determine if the date is a weekend

    Hi all, consider the following data:

    WITH data such AS)

    SELECT To_Date (' 21/08/2015 ',' mm/dd/yyyy') + 1 week IN double

    UNION ALL

    SELECT To_Date (' 08/24/2015 ',' mm/dd/yyyy') + 1 week IN double

    UNION ALL

    SELECT To_Date (' 08/28/2015 ',' mm/dd/yyyy') + 1 week IN double

    UNION ALL

    SELECT To_Date (' 09/2/2015 ',' mm/dd/yyyy') + 1 week IN double

    )

    I've hardcoded dates but in the original request will be dynamically.  what I want to do is to know if the date + 1 falls on a weekend. If so, then I want to increase the date of the next available week. If this is not an end of week, then let date + 1 intact.  my output according to the above data should be:

    day of the week

    =========

    24/08/2015 - aug 21 + 1 falls on a weekend, so to increase the date of next week available (8/24)

    25/08/2015 - aug24 + 1 grave a week day then leaves intact

    31/08/2015 - aug28 + 1 falls on a weekend, so to increase the date of next week available (8/31)

    09/03/2015 - sep02 + 1 grave a week day then leaves intact

    can someone help me to write a query that perform the above output? Thank you

    WITH data such AS)

    SELECT To_Date('08/21/2015','mm/dd/yyyy') double dt

    UNION ALL

    SELECT To_Date (' 08/22/2015 ',' mm/dd/yyyy') OF double

    UNION ALL

    SELECT To_Date (' 08/23/2015 ',' mm/dd/yyyy') OF double

    UNION ALL

    SELECT To_Date (' 08/24/2015 ',' mm/dd/yyyy') OF double

    UNION ALL

    SELECT To_Date (' 08/25/2015 ',' mm/dd/yyyy') OF double

    UNION ALL

    SELECT To_Date (' 26/08/2015 ',' mm/dd/yyyy') OF double

    UNION ALL

    SELECT To_Date (' 27/08/2015 ',' mm/dd/yyyy') OF double

    Select box (trim (to_char (dt, 'day')))

    When "Sunday" then dt + 1

    When 'Saturday', then dt + 2

    on the other

    DT

    end,

    '*'|| TO_CHAR (DT, 'day'). » *'

    data;

    Note has a space of training day - where the trim

    21 August 15 * Friday *.

    24 August 15 * Saturday *.

    24 August 15 * Sunday *.

    24 August 15 * Monday *.

    25 August 15 * Tuesday *.

    26 August 15 * Wednesday *.

    27 August 15 * Thursday *.

    What about the holidays?

  • Data Center shutdown Complete weekend activity...

    Dear team,

    In our environment, we have 22 esx host 4 storage san, 4 fabric switches, network switches 4. every weekend, there is problem of complete power failure will be there, so each client weekend for full on stop data center, so we install full stop that I just want to know what will be recommended for this bee and as precaustion to take before making this kind of activity, so need your help on the same

    Will it work this way, if we turned off the entire infrastructure,

    (1) fist take the glance of each virtual machine power on each host
    (2) then take snap of all the SAN data store that r connected on each host are
    (3) make the snap of networking architecture
    (4) stop each virtual machines on an esx host,.
    (5) stop ESX host
    (6) stop SAN storage
    7-stop Fabric Switches
    (8) stop all network switches

    While switch on/off the infrastructure unit will it work that way,

    (1) power on network switches, after 5 minutes
    (2) after 5 minutes on the fabric power switches
    (3) power storage SAN, after 10 minutes
    (4) power on all ESX hosts after 45 minutes
    (5) power on all the virtual machines on all ESX hosts
    (6) cross check all works very well.

    Correct if I'm wrong, please help me on the same.

    Concerning

    Mr. VMware

    every weekend he comes from complete power failure

    The steps you mentioned certainly works, but I don't see a reason for snapshots. Better make sure that you have a good backup in place. I guess you also have an exact plan on the order in which the power and off the virtual machine.

    On the other side, it may be interesting to find out the reason for the failure and eliminate it or think of a suitable UPS system to avoid this procedure.

    André

  • Count the number of hours between the dates off holiday/weekend

    Hi all

    I've not worked with dates and was recently asked to create a report where I am looking for the number of hours between two dates only count business days.

    So for example I have given as follows

    Created on 2011-03-30 15:00
    Treaty of 2011-03-30 15:03:46
    Filled 2011-04-01 17:25:02
    Posted 2011-04-01 17:45

    For a total of looking for the CREATION and dates

    50 hours and 45 minutes

    IM also trying to exclude weekends and holidays, I read around and was able to also find an array of dates where I main date, the HOLIDAY_IND column, and the column WEEKDAY_IND

    If the calendar table I have looks like

    CALENDER_DATE HOLIDAY_IND WEEKDAY_IND
    2011-03-31 YY
    2011-04-01 N Y
    2011-04-02 N N

    IM really very puzzled to know where to start

    I thought I'd try to write with PL/SQL, but I don't have access of the user to create procedures/functions, so looks like right up to SQL

    Any help is appreciated!

    Hello

    Depeneding on your data and your needs, you can do something like this:

    SELECT     created_DATE,
    ,     mailed_date
    ,     24 * ( (mailed_date - created_date)
              - (
                SELECT  COUNT (*)
                FROM        table_o_dates
                WHERE    main_date > created_date
                AND        main_date < TRUNC (mailed_date)
                AND        (   holiday_ind = 'Y'
                         OR  weekday_ind = 'N'
                      )
              )
               )               AS hours_between
    FROM     table_x
    ;
    

    I hope that answers your question.
    If not, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all tables and also post the results desired from these data.
    Explain, using specific examples, how you get these results from these data.
    Always tell what version of Oracle you are using.

    What do you do if created_date or mailed_date is not a working day? Examples in you data and results.

Maybe you are looking for