Find HOW MANY Saturdays IN A YEAR
Dear Experts,
I have to display the number of SATURSDAYS in a YEAR .
How I can do it ?
Thanks in advance.
Moderator message: date calculation questions = FAQ, please search before posting.
locked by: Thomas Zloch on Sep 8, 2010 12:00 PM
Hi,
Just try the below given code by giving year as input.
PARAMETERS:p_year(4) type n.
data: date type d,
ndate type d,
rem type i,
count type i.
date+0(4) = p_year.
date+4(2) = 01.
date+6(2) = 01.
rem = p_year mod 4.
if rem eq 0.
ndate = date + 366.
else.
ndate = date + 365.
endif.
clear rem.
while date+0(4) eq p_year.
move date to rem.
rem = rem - 1.
rem = rem mod 7.
if rem eq 6.
count = count + 1.
ENDIF.
date = date + 1.
ENDWHILE.
write:/ 'N.o of saturdays are ',count.
It is helpful.
Similar Messages
-
How to find how many sundays in a year
Hi friends...
how to find the how many sundays in a year?
can u give me the query?Sybrand's approach can still be made to work. His formula actually calculates the number of weeks between the first and last Sunday of the year, so he needs to add one to get the number of Sundays (or calculate the number of weeks between to the first sunday of the following year). It also needs a tweak to deal with cases when the year starts or ends on a Sunday because next_day will return the following Sunday.
with t as (
select add_months(trunc(sysdate,'YEAR'),12*(level-20)) as yr from dual connect by level <= 40
select extract(YEAR from yr) as yr,
(next_day(add_months(yr, 12)-1,'SUN')
next_day(yr-1, 'SUN'))/7 as sundays
from t
order by yr
YR SUNDAYS
1991 52
1992 52
1993 52
1994 52
1995 53
1996 52
1997 52
1998 52
1999 52
2000 53
2001 52
2002 52
2003 52
2004 52
2005 52
2006 53
2007 52
2008 52
2009 52
2010 52
2011 52
2012 53
2013 52
2014 52
2015 52
2016 52
2017 53
2018 52
2019 52
2020 52
2021 52
2022 52
2023 53
2024 52
2025 52
2026 52
2027 52
2028 53
2029 52
2030 52Regards,
Bob -
I am an MBA student , doing a research project on e-learning authoring tools, would like to find out no. of licences sold/active to date for adobe captivate. how many get sold every year. any pointers/help is appreciated. cheers.
I doubt you'll get an answer in a user forum, sorry. This forum is meant for users to help other users when they have problems that have to be solved. You should contact Adobe itself.
-
is there any FM for
how many weeks in a year and
how to find the whether the year is leap year or not? and
how many weeks are in the month ?
i want the FMHi Priya,
There is a function module 'TIME_GET_LAST_WEEK'.
In this FM, export the Year & you will get(Import) a value in a parameter
EF_WEEK. This will be the Concatenated String of Year&Number_of_weeks in that year
For Example If you run this FM for the Year 2004, the Parameter EF_WEEK will
be '200453'. That means last two digits gives the number of weeks in that year.
From this value you can easily get number of weeks (i.e,EF_WEEK+4(2)).
If this value is 53, then it is a leap year, else not a leap year
Regards,
Sreenivas Reddy Maddi -
How to find how many times a t code has been processed by a user
How to find how many times a t code has been processed by a user I am not able to get the exact number from the ST03 or STAD/STAT transaction. I am requiring the specific number that this T code has been processed completely this many no of times for a specific period.
You must be more precise with your question.
How long is the time period which you want to check, few hours or several days or longer? And how many executions do you expect, 100, 10000 or millions?
The STAD should help you, for the smaller numbers. There is no solution for the larger ones. Don't mix STAD and ST03, ST03 is aggregated STAD information
and know only how often a transaction was executed in total.
ST05 is no solution for your problem to much overhead, and yoou should trace only a short period.
There is no tool to check usage of transactions in more detail because of privacy reasons.
Siegfried -
How to find how many sto's Created in One plant
Dear
how to find how many sto's Created in One plant
ex: i have 5 plants now i want to check how many sto's doneHi,
Please check in table EKKO for supplying plant against STO document
EKPO against Receving plant
WB2_V_EKKO_EKPO2 - You can pass both supplying plant as well as receving plant.
Regards,
Haresh -
Find how many users are connected in the Oracle Server
Hi,
I am using Oracle 10g. My question is, is it possible to find how many users are connected in the Oracle Server. We are having one Server and we are having many client machines which will connect the Oracle.
And one more question in the meanwhile i want to take Backup of one database which client as connected. Is it get any problem to the client machine which is accessing the server. And How to take the backup from the server machine. Any commands to process.
Thank u...!Hi there.
If You run
select count(*) from v$session where username is not null;you'll get the number of users connected to Oracle server,
and yes , you could do backup while users are connect to db you are backing up.
cheers -
Can I find how many instances of BPEL process is in running state ?
Hi,
How can I find how many instances of BPEL process is in running state ? Any code/API ? help ? ThanksCheck the class com.oracle.bpel.client.Locator...
u can use the method listInstances(WhereCondition wc) to get the required details
Regards
Albin I -
How can i find how many smartforms using a particular smart style
hi experts ,
how can i find how many smartforms using a particular smart style
thnks in advanceHi,
Go to your smartform
Click on Form Attributes->Output options> There you can find the Style.
Reward points if useful.
Thanks! -
Is there a way to find how many users are logging on to my site?
Is there a way to find how many users are logging on to my site at a specific time?
Thanks in advance..Is it possible to use an EJB3.1 Singleton beans for this too? (instead of the application context)
Or will this create a bottleneck because of the standard write lock? It wouldn't be thread safe to provide a read lock on a user_counter increment method? -
How can i find how many sessions are opened in my database
Hai
Iam using Oracle 10g version, front end that iam using is oracle forms6i, sometimes my system get hanged because of some session and not closed i think, can i know how can i find how many session is opened on my database.You could query the V$SESSION dynamic view. More info...here...
HTH! -
How to check the query, which had run how many times in a year?
<Moderator Message: ok, subject is better now but you didn't search at all. Therefore thread is locked again>
Hi All,
I want to check the Query statistics like it had run how many times in a year?
Regards,
Kiran
Edited by: Siegfried Szameitat on Dec 9, 2008 11:55 AMHi Kiran,
please follow the below steps
1. Create a query for that purpose
2. Make use of BW Statistic InfoProvider 0BWTC_C02
3. in Col: Key Figure:0TCTNAVCTR
4. in Row: 0TCTQUERY (select a variable 0TCTQUYS)
5. in Filter: BW System( 0TCTSYSID) [give yr source system name whether its production/quality)
6. in Free char you can give calmonth/year or user if want to do so.
save and execute the query
you will be asked for input the query name
As output you will be getting count (as many times query is hit by all users since the time it was created)
if you give date and user name then it will display the count accordingly.
Hope it Clarifies you.
Thanks & Regards
Nagaraju.V -
HOw to find how many users into into r/3 system and when the log in
HI
I need to find who are others log in to R/3 system?
HOw to find how many users into into r/3 system and when the log inHi,
You can also use transaction code AL08 to see the list of users logged on with the transactions they are working on.
Regards,
Venkat -
Where to find how many emails sent today
where do I find how many emails were sent from my account today? I'm blocked from sending email, by [email protected], saying I've exceeded my daily limit, but as far as I know, I haven't. Recently changed my passwords too, so I'd be surprised if I was hacked.
A digital image does not have dpi (dots per inch), since it does not have any physical dimension, only a pixel size. So you can find out about dpi only by printing, for in the print dialogue you can specify a size in inches or cm. If you look at the pixel size of an image (width and height, given in pixels) and know the physical dimensions you want to have when printed, you can compute the necessary dpi by dividing the width in pixels by the width in inches.
-
How to find how many Orders are reserved
I need to find how many order lines are reserved. If you can send me the SQL that will be great.
ThanksReservation lines are stored in the table MTL_DEMAND.
Maybe you are looking for
-
Multivalue# Error in the count value
Hi, Please help me on this. I am getting Multivalue# Error in the code below. =If (Count([Subclass ID]) <=5;"Subclass: " + [Subclass ID]; " No of Subclass Selected: " + Count(Subclass ID)) Thanks you in advance. Rose
-
How to send a warning message before closing soft via X of the title bar
With labview 8.2: I would like to send a warning message before closing my soft when the user press the "X" of the title bar. Is it possible to do that without a Windows dll? Thanks a lot, Daniel.
-
Getting &#039 in JSP page insead of Apostrophe ( ' )
hi, m getting ' page instead of Apostrophe ( ' ). can u please help me about that. code is --> document.getElementById("corpName").value = '<c:out value="${benOwn.name}"/>'; suppose in text box in insert "Beneficiary's" after saving it display Be
-
Where can i download 10.1 final cut pro x?
Hi, I need to upgrade and download the new version 10.1 on Final Cut Pro X. I've tried check the updates through the app store and no luck. Do you know where I can find it?
-
PanelGrid with PanelTab problem
hello everyone, i am using tomahawak tabbedpane it has 3 panelTab's ,1st paneltab has 3 panelGrid's when i move from one grid to another say 1-2-3 then i click on tab 2 or 3,if i come back to tab1,it should display the grid1 .but it is displaying gri