Looking for formula to fill dates of particular days of week for a given month
Hi
I have a Numbers document with a sheet for each month of the year, named "January", "February", "March", etc.
Each sheet contains a table as follows:
I am looking for a function that will calculate the dates in a given month that I am due to see each client, based on the year (contained in a single cell table on a seperate sheet) and the month of the sheet (I am presuming that a function can refer to the name of a sheet). These dates would populate the cells under "Session 1", "Session 2", etc. (for some days of the week there may be only four sessions, for others five).
I hope this is clear, and would be grateful for any help in getting this working.
Thanks,
Nick
Here's an example, using September, 2011 as the month.
Main Table:
A1: =DATE(Year :: A2,9,1)
This calculates the Date and Time value for midnight at the beginning of the first day of the ninth month of the year indicated in cell A2 of the table "Year" (September 1, 2011). It uses a Custom format to display only the month and year of this date. The Dates calculated in the rest of the table depend on the Date and Time value in this cell.
A2 - A11: Entered data. Not used in calculations.
B2 - B10: Entered data. The text values here are used as search-for values, and must match the text values in column A of the table Weekday lookup.
C2, Filled down to C10: =$A$1+MOD(7-WEEKDAY($A$1)+VLOOKUP(B,Weekday lookup :: $A:$B,2,FALSE),7)
This calculates the Date corresponding to the first occurrence of the weekday indicated in B during the month in A1. The result is a Date and Time value (used in formulas to the right). The cells use a custom format to display only the Day (of the month) number.
D2, Filled right to column F and down to row 10: =C+7
Calculates the date seven days after the date in column C.
G2, filled down to row 10: =IF(MONTH($A$1)=MONTH(F+7),F+7,"")
This is the same formula as used in D2, but adds a check to suppress the calculation if the result is not in the same month as other dates on the table.
Year: The requested single cell table to record the year.
Weekday Lookup: A lookup table from which to retrieve the weekday number for the day in column B of the main table.
Custom formats:
Select cells C2 - G10
Open the Inspector > Cell Format Inspector > Date and Time
Delete the unwanted elements from the workspace in the Inspector.
Repeat for cell A1.
Regards,
Barry
PS: Numbers cannot use the Sheet name or Table name as data for a formula unless the name is placed into a cell on a table.
B
Similar Messages
-
Hi All,
Want to get the number of hits in a day for a web application with IIS logs. so need to know Query for log Parser to get number hits in a day or week for particular web applications or site collection. Kindly help
Regards,
NaveenI'm trying to get this from WSS 3.0, Hence using the Log Parser
-
Which subscription is best for a non profit organization (with limited funds) who needs CC for 1 day a week for maybe 2 or 3 months?
Hi sonnetje,
Kindly go through Creative Cloud pricing and membership plans | Adobe Creative Cloud
If you need it for 2-3 months please check of month-to-months plan as the Annual membership comes with a contact and there would be an early termination fee attached to it. which is 50% of the remaining months.
For more info check the below mentioned link.
Link : Cancel your membership or subscription | Creative Cloud
Thanks,
Atul Saini -
Query to group dates based on days of week
Hi,
I have a table containing the following format:
Create table testtable(dates date, day_identifier number);
The day_identifier column data contains the corresponding dates columns' day of week equivalent i.e.
to_char(dates, 'd')
The table contains following sample data:
Dates
Day_identifier
01-Oct-2013
3
02-Oct-2013
4
04-Oct-2013
6
06-Oct-2013
1
08-Oct-2013
3
09-Oct-2013
4
11-Oct-2013
6
18-Oct-2013
6
21-Oct-2013
2
23-Oct-2013
4
I am looking for a query that will group the above data based on the day_identifier column data into the following format:
01-Oct-2013 11-Oct-2013 1346
18-Oct-2013 23-Oct-2013 246
The above data if expanded i.e.
all dates between 01-Oct-2013 and 11-Oct-2013 and having day of week value in 1,3,4,6
and
all dates between 18-Oct-2013 and 23-Oct-2013 and having day of week value in 2,4,6
will give me the above table's resultset.
Please help me in resolving the issue.
Thanks.with
groups as
(select 'one' grp,
to_date('01-Oct-2013','dd-Mon-yyyy') low_date,
to_date('06-Oct-2013','dd-Mon-yyyy') high_date,
'3,5,7' day_identifiers from dual union all
select 'two',to_date('10-Oct-2013','dd-Mon-yyyy'),to_date('16-Oct-2013','dd-Mon-yyyy'),'1,2' from dual union all
select 'six',to_date('20-Oct-2013','dd-Mon-yyyy'),to_date('26-Oct-2013','dd-Mon-yyyy'),'4,5,6' from dual
dates as
(select trunc(sysdate,'mm') + level - 1 the_date,to_char(trunc(sysdate,'mm') - level - 1,'d') day_identifier
from dual
connect by level <= to_number(to_char(last_day(sysdate),'dd'))
select d.the_date,d.day_identifier,g.grp,g.low_date,g.high_date,g.day_identifiers
from dates d,
groups g
where d.the_date between g.low_date(+) and g.high_date(+)
and instr(','||g.day_identifiers(+)||',',','||d.day_identifier||',') > 0
THE_DATE
DAY_IDENTIFIER
GRP
LOW_DATE
HIGH_DATE
DAY_IDENTIFIERS
10/01/2013
1
10/02/2013
7
one
10/01/2013
10/06/2013
3,5,7
10/03/2013
6
10/04/2013
5
one
10/01/2013
10/06/2013
3,5,7
10/05/2013
4
10/06/2013
3
one
10/01/2013
10/06/2013
3,5,7
10/07/2013
2
10/08/2013
1
10/09/2013
7
10/10/2013
6
10/11/2013
5
10/12/2013
4
10/13/2013
3
10/14/2013
2
two
10/10/2013
10/16/2013
1,2
10/15/2013
1
two
10/10/2013
10/16/2013
1,2
10/16/2013
7
10/17/2013
6
10/18/2013
5
10/19/2013
4
10/20/2013
3
10/21/2013
2
10/22/2013
1
10/23/2013
7
10/24/2013
6
six
10/20/2013
10/26/2013
4,5,6
10/25/2013
5
six
10/20/2013
10/26/2013
4,5,6
10/26/2013
4
six
10/20/2013
10/26/2013
4,5,6
10/27/2013
3
10/28/2013
2
10/29/2013
1
10/30/2013
7
10/31/2013
6
Regards
Etbin -
Get the starting date and end date of all weeks of a given month and year
hey Guys so far I have this.. but I am having difficulty limiting it by month. I am using Oracle 11 release 1
Select year, week, next_day( to_date( '04-jan-' || year, 'dd-mon-yyyy' ) + (week-2)*7, 'sun' ) as weekStartDate,
next_day( to_date( '04-jan-' || year, 'dd-mon-yyyy' ) + (week-2)*7, 'sun' ) +6 as weekEndDate
from (Select '2012' year, rownum week from all_objects where rownum<=5)
Thanks in advance
Edited by: Aj05 on Jan 12, 2012 7:42 AMFirst you need to define week starting day. If, for example it is Monday:
TRUNC(TRUNC(&dt,'YYYY') -1,'IW')is first Monday of the year. Then:
SELECT TRUNC(TRUNC(&dt,'YYYY') -1,'IW') + (LEVEL - 1) * 7 week_start_date
FROM DUAL
CONNECT BY LEVEL <= 53
/will give start dates of all weeks within &dt year. And:
WITH t AS (
SELECT TRUNC(TRUNC(&dt,'YYYY') -1,'IW') + (LEVEL - 1) * 7 week_start_date
FROM DUAL
CONNECT BY LEVEL <= 53
SELECT week_start_date,
week_start_date + 6 week_end_date
FROM t
WHERE week_start_date > TRUNC(&dt,'MM')
AND week_start_date < ADD_MONTHS(TRUNC(&dt,'MM'),1)
/will give you week start/end dates within &dt year and month. For example:
SQL> DEFINE dt="DATE '2012-03-17'"
SQL> WITH t AS (
2 SELECT TRUNC(TRUNC(&dt,'YYYY') -1,'IW') + (LEVEL - 1) * 7 week_start_date
3 FROM DUAL
4 CONNECT BY LEVEL <= 53
5 )
6 SELECT week_start_date,
7 week_start_date + 6 week_end_date
8 FROM t
9 WHERE week_start_date > TRUNC(&dt,'MM')
10 AND week_start_date < ADD_MONTHS(TRUNC(&dt,'MM'),1)
11 /
old 2: SELECT TRUNC(TRUNC(&dt,'YYYY') -1,'IW') + (LEVEL - 1) * 7 week_start_date
new 2: SELECT TRUNC(TRUNC(DATE '2012-03-17','YYYY') -1,'IW') + (LEVEL - 1) * 7 week_start_date
old 9: WHERE week_start_date > TRUNC(&dt,'MM')
new 9: WHERE week_start_date > TRUNC(DATE '2012-03-17','MM')
old 10: AND week_start_date < ADD_MONTHS(TRUNC(&dt,'MM'),1)
new 10: AND week_start_date < ADD_MONTHS(TRUNC(DATE '2012-03-17','MM'),1)
WEEK_STAR WEEK_END_
05-MAR-12 11-MAR-12
12-MAR-12 18-MAR-12
19-MAR-12 25-MAR-12
26-MAR-12 01-APR-12
SQL> SY. -
Formula for dates back 7 days failing because of end of month?
HI I have a CR that has been working fine till now. it runs every Sunday late in the day and looks back past 7 days. it has formula for dates from and to.
tonumber(totext(CurrentDate,'yyyyMMdd'))-6
and tonumber(totext(CurrentDate,'yyyyMMdd'))
yet this past Sunday, it is not giving all previous 7 days. could it be related in any to the end of month? i cant think this is it. but perhaps.the date col is type = NUMBER and in YYYYMMDD.
WHen I ran this report manually by selecting on the dates needed it returns more data.Hi Paul,
The issue is when you convert a date to number a subtract 6 from it, it doesn't go 6 days back; it just subtracts 6 days from that converted number.
So, today, represented as a number would be 20140804 however, when you subtract 6 from this number you get : 20140798 which of couse is Not a date.
Your code (if the dates are stored as number in the database) should be :
tonumber(totext(CurrentDate-6,'yyyyMMdd'))
-Abhilash -
How to fill data in to extended idoc segments for outbound program
Hi all,
I am new to this Community In the extension of Standard idoc INVOIC02 with some custom segments like zemail, zfax,,,,how to fill the data into both standard segments and custom segments for outbound idoc using exit EXIT_SAPLVEDF_002 of standard function module IDOC_OUTPUT_INVOIC...
i need some sample code
THANKS
PAVAN KHi all,
I am new to this Community In the extension of Standard idoc INVOIC02 with some custom segments like zemail, zfax,,,,how to fill the data into both standard segments and custom segments for outbound idoc using exit EXIT_SAPLVEDF_002 of standard function module IDOC_OUTPUT_INVOIC...
i need some sample code
THANKS
PAVAN K -
Date Breakup with Monday First Day of Week for Fortnight
Post Author: Guggu
CA Forum: Formula
Hi,
I am using a cross tab and I am trying to break up the data by the reporting periods we use, which is 2 weeks and is from Monday of Week 1 to Sunday of week 2.
I use the GROUP OPTIONS in Crystal report XI and tell it ot show FOR EACH TWO WEEKS but shows the dates with SUNDAY the first day of the week.
I had some BASIC SYNTAX which used to work in v8.5 and some times works for XI but not this time, so i would like to know if there is a better way to work this out as all my reports need to be done this way.
The BASIC SYNTAX i had was:
Dim ew1 As Date Dim rosterdate As Date Dim i As Number Dim fortnight As Date rosterdate = cdate({?StartDate}) + 70 ew1 = cdate({?StartDate}) ew1 = ew1 + 13 For i = 1 To 10
If rosterdate <= ew1 Then fortnight = ew1 formula = fortnight Exit For End If
ew1 = ew1 + 14Next i
But this is not working anymore.
Can someone please help.
Kindest Regards,
GeorgeI just realized that the .../CatalystScripts/Java_DatePicker.js was modified on April 1st, but not by me. Did you do that?
The weekdays were sorted by Monday to Sunday, but the number of the days were not right. So today it showed Tuesday the 6th of April (of course it should be Monday).
My client just contacted me, that they have a mess with the reservations, people did reservations with the wrong date
I already changed it to the previous version. I think, I will implement a jQuery-datepicker, the BC datepicker is not flexibel enough. -
I just switched to the $50 unlimited last month and I noticed after 2 weeks of usage it keeps prompting me to add another $50 payment. That is more than I was paying previously. I switched so I could call anyone not just Verizon users.
If it is defective, then they will replace it.
They will replace it with the exact ame model that you currently have.
They will have planty for years for replacements.
It is not unusual at all for any company to stop selling the old version once the new one is released.
This does not mean that they all immediately dissappear. -
Job creation on particular days in week
hi All,
OS : RHEL 5.7
DB : 11.2.0.2
I have created one job. I want to run one procedure from Monday to Saturday at 10AM.
Below is my code.
Please check the code and tell me is it correct because i dont have that much idea about scheduling a job.
have i wrote that "job_action" section rightly? -- "TEST_PROCEDURE" is my procedure.
BEGIN
DBMS_SCHEDULER.create_job (
job_name => 'TEST_JOB',
job_type => 'STORED_PROCEDURE',
job_action => 'exec TEST_PROCEDURE;',
start_date => SYSTIMESTAMP,
repeat_interval => ‘freq=weekly; byday=mon,tue,wed,thur,fri,sat; byhour=10; byminute=0; bysecond=0;’,
end_date => NULL,
enabled => TRUE,
comments => 'Procedure will run From Mon to SAT at 10 AM.');
END;
Regards.Hi all,
After your all comments and reading some documnets I have changed only "JOB_ACTION" and "‘freq=daily" parameter which is given below :
BEGIN
DBMS_SCHEDULER.create_job (
job_name => 'TEST_JOB',
job_type => 'STORED_PROCEDURE',
job_action => TEST_PROCEDURE',
start_date => SYSTIMESTAMP,
repeat_interval => *‘freq=daily;* byday=mon,tue,wed,thur,fri,sat; byhour=10; byminute=0; bysecond=0;’,
end_date => NULL,
enabled => TRUE,
comments => 'Procedure will run From Mon to SAT at 10 AM.');
END;
I think this must work and suppose i want to run this from tommorrow, not nw then what should i mentioned?
Regards. -
Changing date format for some of the date columns in a subject area
Hi,
I have a requirement to change the date format for some of the date columns to dd-mon-yyy for only a particular subject area. Is there a feature available in the RPD which can help me do this?
In Answers - Column Properties for a Particular column of a report, we can save the style and formatting as system wide default for the particular column or the data type, but that applies across subject areas.
I tried with the config files too , but that too applies to all suject areas.
Thanks in Advance,
GauravWhy don't you create 2 logical column derived from same date physical col and then change the format for one logical column and use it in Subject Area ?
-
How to get the date of first day of a week for a given date
Hi gurus
can any one say me how to get the date of first day(date of Sunday) of a week for a given date in a BW transformations. For example for 02/23/2012 in source i need to get 02/19/2012(Sunday`s date) date in the result. I can get that start date of a week using BWSO_DATE_GET_FIRST_WEEKDAY function module. But this function module retrieves me the start date as weeks monday(02/20/2012) date. But i need sundays(02/19/2012) date as the start date. So it would be really great if anyone sends me the solution.
Thanks
RavHi,
The simplest way would be to subtract 1 from the date date which you are already getting in transformation routine, but instead of doing that subtraction manually which might need bit of errort, you can simply use another FM to subtract 1 from given date.
RP_CALC_DATE_IN_INTERVAL
Regards,
Durgesh. -
Default Values For Foreign Trade Header Data
Hello,
I have defined a price condition (ZPFR) to gather the price from the company to the custom office (the customs office through which the goods enter or leave the country).
I want that price condition to be determined in the pricing procedure in foreign trades. The fields in the access sequence are the Plant and the Customs office. In customizing, in the point Default Values For Foreign Trade Header Data, I have defined a line for the Departure country, the Destination Country and the proper values for the Office of exit, Export Custom Office and Office of destination (the same that I have selected in the condition record). But when I create a sale document, this condition does not determine because the Customs office seems not to have any value in the document. Does anybody what I am doing wrong?
Thank you in advance,
SilviaYou require to do thenecessay configuration for Foreign Trade Data:
IMG --> Sales and Distribution --> Foreign Trade/Customs --> Basic Data for Foreign Trade --> (Do the necessary configuration here)
In most probability, it will not default, but it is required to be maintained in Invoice (based on configuration)
Regards,
Rajesh Banka
Reward points if helpful. -
Long time for loading Planning books/data views
Hi
Could someone throw some pointers/solutions for extremely horrible time taken for a planning view (data view) to load and populate for certains selection profiles that already have large number of trasactional records. In my case it is specifically the run time dumps thrown for a popular combination (large number of transactions).
Urgent suggestions/solutions required. Pls. call 9923170825. India, if you are lazy enough to type it out. or just type in some key words, tcodes etc.
ThanksI hope you dont have too many macros hogging the memory in interactive book. The other thing is to be on the latest LC build. Also try to have default unit of measures (keep the dataview settings for UoM blank).
Can you confirm if you build the TLB view brand new in 5.0 or did you do some migration of the books ? The first time opening of book takes longer due to some compilation of certain objects. in SM50, try to identify where the process takes longest - whether it is at client end, at the DB procedure of LC or at application level. -
Maintain pricing conditions for the material for the excise invoice date
When I am doing MIGO (Release GR Blocked Stock-movement type) t)he system is giving an error "Maintain pricing conditions for the material for the excise invoice date"I am attaching screen shot for reference.
I request if any one can provide me the solutionHi,
Check did you have entry of that movement type in the following path where you specify which movement type relating to goods receipts involve excise invoices
SPRO -
> Logistics general -> tax on Goods Movements-> India -> Business Transactions--> Specify Which Movement Types Involve Excise Invoices
Regards,
Biju K
Maybe you are looking for
-
Printing Wirelessly with HP PSC 1410 (or many other HP and other printers)
I had a lot of difficulty and found this in an old forum - other people were complaining that it doesn't work but it worked perfectly well for me, after many months of frustration! Just thought I'd repost it. I downloaded and installed the three prog
-
When I send emails using my iPad, some recipients are telling me that I am sending them blank emails. I've had some of them forward the emails back to me so I can take a look and it seems that my message is actually there but the text is white. Int
-
Change to list of snooze times in 10.9.5?
Holding down the Snooze button on a notification has, since the original 10.9, allowed you to select a time until the notification will reappear. (Yes, the list is different depending on whether the event has already occurred.) I just tried to snoo
-
I am trying do a sanity check before I order some hardware. What I want to do is acquire from multiple channels in a SCXI chasis and as part of the same acquisition, also read from one of the "un-used" AI channels of the MIO card. My concern is this:
-
How can I send a string like this thru UDP: 0x01 0x40 0x43 0x51 Can I write it like this: data= 0x01, 0x40, 0x43, 0x51; Any help, please?