Days of the week in a month

I want to get every day of the week in a month.
I mean I have beteen date setting
from 12/01/07 to 31/07/12
and I need every day of the week between these dates.

Please tell me how?

Hey Ghulam,

I want to get every day of the week in a month.

Query:

SELECT     TRUNC (SYSDATE, 'MONTH') + LEVEL - 1 the_date,
           TO_CHAR (TRUNC (SYSDATE, 'MONTH') + LEVEL - 1, 'Dy') dt
      FROM DUAL
     WHERE TO_CHAR (TRUNC (SYSDATE, 'MONTH') + LEVEL - 1, 'Dy') NOT IN
                                                               ('Sat', 'Sun')
CONNECT BY LEVEL <= LAST_DAY (SYSDATE) - TRUNC (SYSDATE, 'MONTH') + 1;

Thank you
Shankar

Tags: Database

Similar Questions

  • average amount of an article during the days of the week to a month

    Dear members,

    I want an application that compiles the data as below.

    Point 1 first day of the week saying Monday by 10 in a specific month

    Article 1 Monday next 20th of the same month qty

    Article 1 Monday 25th of the same month next qty

    Article 1 Monday next 22nd of the same month qty

    If there are 4 four Mondays of the month

    the avg of 1 article is (10 + 20 + 25 + 22) / 4 = 19.25

    Similarly, avg of article 2, point 3, point 4. .on every Monday, Tuesday, Wednesday... for a month.

    kindly show me the way...

    Thank you.

    teefu

    Lahore.

    Hi teefu,

    Try this

    create table ts1

    (sale_date date, item_code number, number of qty_sold);

    Insert the ts1

    values (to_date('02-Jun-2014','DD-mon-YYYY'), 1, 10);

    Insert the ts1
    values (to_date('16-Jun-2014','DD-mon-YYYY'), 1, 20);

    Insert the ts1
    values (to_date('23-Jun-2014','DD-mon-YYYY'), 1, 30);

    Insert the ts1
    values (to_date('23-Jun-2014','DD-mon-YYYY'), 1, 25);

    Insert the ts1
    values (to_date('30-Jun-2014','DD-mon-YYYY'), 1, 30);

    Insert the ts1
    values (to_date('02-Jun-2014','DD-mon-YYYY'), 1, 10);

    Insert the ts1
    values (to_date('05-Jun-2014','DD-mon-YYYY'), 1, 70);

    Insert the ts1
    values (to_date('12-Jun-2014','DD-mon-YYYY'), 1, 150);

    Insert the ts1
    values (to_date('26-Jun-2014','DD-mon-YYYY'), 1, 40);

    Select item_code, to_char(sale_date,'Day') day, avg (qty_sold) avg_sold

    ts1 by item_code group, to_char (sale_date, 'Day')

    output

    ITEM_CODE DAY AVG_SOLD

    --------- --------- ---------

    1 Monday 19,25

    1 Thursday 86.666667

    Select the day of item_code, to_char (sale_date, 'Day'),

    Sum (qty_sold) wheel (TO_NUMBER (to_char (sale_date, 'w'))) avg_sold

    of ts1

    Item_code group, to_char(sale_date,'Day');

    ITEM_CODE DAY AVG_SOLD

    --------- --------- ---------

    1 Monday 15.4

    1 Thursday 65

  • Get number of days of the week to a month

    Hi, someone can tell me how to get the number of working days per month, or the number of days other than Saturdays and Sundays

    Well, others and I already posted an example of use of sysdate?

    Maybe you need to take a look at this again.

    Just trunc sysdate to month: trunc (sysdate, 'mm') = 06/01/2009
    Take the start of the next month less a day: trunc (add_months (sysdate, 1), 'mm')-1 = 30-06-2009 (or use last_day)

    Use a connection level, count the days without the Treaty, and there you go...

  • Recurring appointment Set for certain days of the week each month in the calendar on Surface RT?

    It seems to me that this is not possible, but is there a way I can put a recurring appointment for a certain day of the week of each month in the calendar on the Surface RT? For example, a meeting Tuesday on two or one excursion each fourth Sunday?  I know that this is possible in Outlook on a PC and I would like to do it on the Surface RT as well.  Most of my recurring appointments are of this type.  When I recur every month on the Surface, it just sets it for the same date (for example the 12th of each month) instead of the second Tuesday.  Thank you!

    Hi Lisa,

    You were correct when you say that 'it seems to me that's not possible. ' The recurring appointment for some day of the week each month in the calendar on Surface RT cannot be done by date and not day.

    Good day!

  • Appointments that occur every day of the week

    Why the Q9h only allows you to choose an appointment if you start on a Monday, 16 November, to Occur: 'Once', 'Every Monday', ' Day 16th of each month "and" each Nov 16 "and that's it?".  I want an appointment occur all the working days and is not a choice.  I can set up this type of appointment in OUTLOOK, but after a week or two it just stops working on my phone.  Is the only alternative to the 5 appointments, one for each day of the week, or can change you the "Periodicity" field to add "Every day of work" in the options?  If this isn't the case, it would be a great addition to the new update when it is published.

    Synchronize you with Outlook? I put all mine up there and Blackberry Connect syncs to phone "over the air".  I have an alarm software that will allow the establishment of an unlimited number of detectors that are recurring, Chronos by ActiveKitten Software

  • Work day of the week of the date of

    Hi guys, is a bit common code that allows you to work on the day of the week for a given date? IM pretty new to this and I don't know how to write it and thought since it's probably quite commonly need I may be able to get help here. Thank you.

    Day of the week in letters
    Select to_char (sysdate, 'day') of double;

    Day of week in numbers
    Select double to_char(sysdate,'D');

    Day of the month in figures
    Select to_char (sysdate, 'DD') of double;

  • Formula to determine if a specific day of the week between two dates?

    I am creating a spreadsheet to track my time PD & holiday. I usually work weekends, and my vacation allowance includes a specific maximum number of Sundays a year. Is there a way to calculate how much Sunday fall between a date range (or any day of the week, by the way)?

    (i.e. If my vacation starts February 1, 2016 and ends March 2, 2016, Sunday how are included?)

    I know that I can calculate how many weeks have passed, using = Quotient (DateDiff (Start_Date, End_Date), 7), but it is possible to include two Sundays in a period of 7 days.

    Hi Eric,.

    Here is one approach.

    C2 = A2 + (7−WEEKDAY(A2,2))

    This concludes the first Sunday following the start date.

    D2 = STRIPDURATION ((B2−C2) ÷7)

    I formatted this column without decimal places to see full weeks of the first numbers Sunday.

    Quinn

  • Calendar of the days of the week

    I did a VI gives the date and time as a string of characters.

    I would like to have the n ° of the day of the week (value between 0 and 7) rather than son abbreviation.

    How should you configure the service pour have a number?

    Thank you pour your answers.

    Here's how you can get the number of the day of the week; Sunday as the first day. I leave it to you to concatenate the information into a string of characters to the desired format.

    The attention without delay loops which will load the CPU at 100%! I allowed myself to make some changes to your example.

  • Remove the DAY of the week from the taskbar!

    I can barely see at present; the day of the week came when I allowed updates.

    Above screenshots were taken with my Win 7 computer.

    Here are the screenshots taken in my Vista computer

  • Citing the calendar in day of the week (Mon, Mar, sea etc)...

    Hello

    How to invoke the native calendar to a specific day of the week, as Monday.

    If today is Monday call for Monday, if today of call Tuesday to next Monday, etc.

    You're right, official docs seems to be inaccurate, it must be:
    Action: "bb.calendar.OPEN."
    MIME: "text/calendar".
    Data : '? "view annex = & date = MON Jul 20% 2027% 202015.

    'view' application works and will actually view day but date of query does not work, although I respected the date format required in this doc:
    https://developer.BlackBerry.com/native/documentation/device_platform/invocation/calendar.html

    I tried with a few different date format but cannot make it work.

  • Selection field of the day of the week as the appointment screen

    Hello

    I am developing a screen exactly similar to the ' screen new appointment "in the calendar application. But I can't find any appropriate UI component to expand the field of selection of the day of the week.

    In the 'new appointment screen of origin', this field of choice in week appears when you select "weekly" in the choicefield "recidivism". There are 7 characters, one for each day of week & you can select / deselect a day of week by pressing the space bar.

    Now, can someone please give me an idea on how to develop this field?

    Thank you.

    Hello

    Add HorizontalFieldManager and add ButtonFields on measurement (method overload f.e paint.).

    ButtonFieldListener is added to the custom field button.

    If selected the day of the week (given by the manufacturer) paint "BOLD", and another not.

    Kind regards

    Jochen

  • How to make it so that the DAY OF THE WEEK looks with the date and time?

    I had the day of the week, introduce yourself on XP, but it is a feature that they took off with Windows 7?  Does anyone know how to make it stay there permanently?

    Thank you

    Time, day and date will appear on the taskbar if you double its height. Unlock the taskbar and drag it up a notch with the mouse cursor...

  • Why Windows 8 'Calendar' app has no option to change the first day of the week?

    Why can't I change the first day of the week in 'Calendar' app?

    Hi Andriamparany,

    Windows calendar - like some other ' standard' Windows 8 applications - is pretty basic and was obviously designed to speed up tasks 'on the fly'. As soon as it comes to advanced settings for these applications, you will need to upgrade to the "long" version

    A good example is changing the 1st day of week / time of starting the day... To do this, you must go to http://Outlook.com (what I called the "expanded version" of Windows 8 Mail, calendar, people... APSS). So, from your browser preferred:

    • Open http://Outlook.com and enter your address email + password if necessary
      ==> By default, it displays your emails
    • Click the arrow to the bottom of the Panel that is located next to Outlook - upper left corner of the page
      ==> This shows 4 tiles: Mail, people, calendar and SkyDrive
    • Click on the calendar tile
      ==> That displays your calendar
    • Click the Options - just before a blue ? - link in the upper right of the screen

    Don't forget to save your changes when you have finished...

    Hope that answers & help

    See you soon

    LZ.

  • Day of the week setting

    I am completely new to OBIEE, and trying to figure out the best way to take care of this:

    Monday, I want "attributes of the account. "" Registration date "= TIMESTAMPADD (SQL_TSI_DAY,-3, CURRENT_DATE) and all the other days of the week, I want to 'attributes of the account. "" Registration date "= TIMESTAMPADD (SQL_TSI_DAY-1, CURRENT_DATE)

    Should I make a CASE statement in the filters in the Advanced SQL section?  How should I set Monday?  With a system variable or a date attribute full?  If I go with the full date attribute, I'd cast/convert in a day of the week.

    Let me know your opinion, I would be happy!

    Understand what I did wrong:

    "Consumer Internet Banking account attributes '." Date registration of IPC"= TIMESTAMPADD (SQL_TSI_DAY, (case when (CURRENT_DATE) DAYOFWEEK = 2 then else end - 1-3), CURRENT_DATE)

  • get the number of the day of the week - any national locale is used

    Hi all

    My need is to get the number of the day of the week - any national local is used.

    For example, Saturday's 6th day of the week in my country, because the week starts on Monday.

    I heard that some countries start the week of Sunday.

    So my need is to compile code that does not depend on local national.

    How can I make it?

    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    PL/SQL Release 11.2.0.1.0 - Production

    "CORE 11.2.0.1.0 Production."

    AMT for Linux: Version 11.2.0.1.0 - Production

    NLSRTL Version 11.2.0.1.0 - Production

    Hello

    2621671 wrote:

    Hi all

    My need is to get the number of the day of the week - any national local is used.

    For example, Saturday's 6th day of the week in my country, because the week starts on Monday.

    ...

    That's what you asked for, whatever your NLS settings:

    1 + TRUNC (dt) - TRUNC (dt, 'IW')

    If dt is a DATE, TRUNC (dt, 'IW') is the beginning of the ISO week containing dt.  ISO weeks always start on Monday, whatever NLS_TERRITORY, or other NLS parameters.

    I heard that some countries start the week of Sunday.

    So my need is to compile code that does not depend on local national.

    How can I make it?

Maybe you are looking for

  • Massive storage of decompression problem

    I was trying to download an important file from a friend (. tar.gz), and when I went to unpack it (in the archive utility), the file is immediately explode fills almost all the entire my drive (4to). (The original file was only 2 GB)... The decompres

  • can I get an upgrade for hp probook 4430 gpu s

    I have a hp probook 4430 energy efficient model with intel 3000 hd is be possible to update my graphics card to one of the suppliers of gpu nvidia or amd?

  • Windows Update causes freeze/Crash

    The latest version of windows (25 August) crashed my laptop under Vista and now it only works in safe mode. If I reset it to 20:00 on August 24, it works fine, then it executes the same update process and crashes again (3 times now) and now I am in s

  • Windows 7 does not recognize my iphone

    After you download the photos on my iphone, windows 7 does not recognize my iphone. in other words when I open my computer the iphnoe isn't here; but in Panel, in devices and printers, it appears with unspecified Apple Mobile Device USB driver, in th

  • Device is video card Radeon DX9 ATI fire series, how to keep an update for it now that I'm in Windows 8?

    I have recently upgraded to Windows 8 32-bit with the free media player option and I get action center notifications telling me that I need to update the drivers. Could someone tell me where I could get them or maybe Microsoft will release a fix for