Calculate to date
can any one solve my problem..
These are the dates in which transactions have done…
I want to calculate from date & to date…
to date = which is the next Transaction date – 1.
As below.
If I give in selection screen_1
I want the o/p as below_1.
Abserve first record
First record of from date must be select-option low date
Abserve last record
Last record to date must be select-option high date
If I give in selection screen_2
I want the o/p as below_2.
Moderator message : Requirement dumping not allowed, discussion locked.
Message was edited by: Vinod Kumar
Hi
I have an immediate requirement from my client as following.
I have prompts : Year, Month,Quarter and Date between
When the user selects an year --> then the headcount is calculated as following either Annulized/Monthlyor quarterly
HC= Sum(headcount of each day in that selected year) / No of days in the year
Similarly for Month,Quarter and date between.
If this is computed then I can apply the same logic for FTE calculation.
Any inputs or help greatly appreciated.
thanks in advance
hk
Similar Messages
-
How to calculate first date and end date of this year in Query
Hi Expert
I want to calculate following dates with inputted date in query.
I have no knowledge on ABAP and I just can create a query with simple logic.
Could you teach me how to calculate following date?
(If inputted date is April 12 2009)
- First date of this year (Ex January 1 2009)
- End date of this year (Ex December 31 2009)
- First date of last year (Ex January 1 2008)
- End date of last year (Ex December 31 2008)
- First date of this month (Ex April 1 2009)
Thank you!
TakeHR_JP_MONTH_BEGIN_END_DATE use this FM to get the begin and end date of the Date you are passing. eg when u give input as 04/12/2009, it will return
04/01/2009 as begin date
04/30/2009 as end date
pass the Year in this FM HR_E_GET_FISC_YEAR_DATES, you will get the Fiscal year Begin and End Dates
Abh -
In AP invoice i need to make "Terms date " field to calculate the date automatically when i select the payment terms.
How can i do this?Hi,
You can select the Payment Term at PO Header Level.
When you book an invoice, that Payment Term will automatically defaulted to Invoice.
You can define Payment Term in AP.
Payment terms have one or more payment terms lines, each of which creates one scheduled payment. Each payment terms line and each corresponding scheduled payment has a due date or a discount date based on either a specific day of a month, such as the 15th of the month, or a number of days added to your terms date, such as 14 days after the terms date.
Payment Terms (Oracle Payables Help) -
How to calculate start date of the week based on week number ?
i need to get week number of the current date and based on that i need to calculate start date falling in the same week for last year.
Eg. today is 31st week of year and 31st july date. so what will be the date on the 31st week of last year. i need the start date of that week.
we can calculate the week number by select to_char(sysdate,'ww') from dual.
DO we have a single line query for that or will it require writing a pl/sql block ?you can try following query
it can be as inline but for more clean look and create it as select with include select
with t as
(select sysdate as dt from dual)
select to_char(prev_year_dt - to_char(prev_year_dt, 'D') + 1, 'DD.MM.YYYY') as start_of_week from (select
-- get day from prev year with the same week number
case
when to_number(to_char(add_months(dt, -12), 'WW')) > to_number(to_char(dt, 'WW')) then
dt - (to_number(to_char(add_months(dt, -12), 'WW')) - to_number(to_char(dt, 'WW'))) * 7
when to_number(to_char(add_months(dt, -12), 'WW')) < to_number(to_char(dt, 'WW')) then
dt + (to_number(to_char(dt, 'WW')) - to_number(to_char(add_months(dt, -12), 'WW'))) * 7
else
add_months(dt, -12)
end as prev_year_dt
from t) t1good luck
Sergii
'Monday' is not first day of week in 100% ;)
Edited by: Galbarad on Jul 30, 2012 11:00 PM -
Hello guys:
I need your help here.
I try to build an application that has to calculate the due date for 14 days.
I have two date picker:
1)P11_BORROW_DATE
2)P11_RETURN_DATE
How can i calculate the borrow date plus 14days to become the return date shown in the in the second date picker.
I am using date format of (DD-MM-YYYY).
Can u guys explain to me step by step, for example : (html form header region, process, and also htnl attiributes, etc )
Edited by: user10258545 on 14-Sep-2008 10:57hello
>> It can calculate the date after i press a button. It cannot calculate automatically when i change the borrow date in my application.
In his example, Denes is using AJAX. You can read more about AJAX with APEX in here - http://htmldb.oracle.com/pls/otn/f?p=11933:63 . This page should answer most of your questions.
I’m not sure why you think you must press a button in order to fire the AJAX code. You have complete control on the firing timing, by using the appropriate event. Using ‘onchange’ or ‘onblur’ will fire the AJAX code without pressing any button.
>> Btw, where should i load the process??
The processes involved with APEX are Application Processes with process point of “On Demand …”. They are been loaded on demand, by part of the AJAX process.
Regards,
Arie. -
Using Numbers, can I calculate the date that will be eg 45 days ahead of a given date?
Using Numbers, can I calculate the date that will be eg 45 days ahead of a given date?
MWB,
Certainly. Let's say that your given date is in B2. The date 45 days earlier can be found with:
=B2 – 45.
Almost seems too simple.
Jerry -
"D2008178" - FM to calculate the date of the x day in a year
Hi all!
I am looking for a FM to calculate the date of a certain day in the year.
For example which date has the day 178 of the year.
This has nothing to do with the factory calendar!!!
Thanks a lot for your help
CU
PeterHi Peter,
Please check this funtion module "FIMA_DATE_CREATE".
Sample code as follows:
REPORT ztest_vinay.
DATA: w_date TYPE vtbbewe-dvalut.
PARAMETERS: p_date TYPE vtbbewe-dvalut.
CALL FUNCTION 'FIMA_DATE_CREATE'
EXPORTING
i_date = p_date " Here you need to pass first day of the year
i_calendar_days = 178
IMPORTING
e_date = w_date.
WRITE: w_date.
Regards,
Vinay
Edited by: Vinay Kumar Amruth on Feb 18, 2009 2:52 PM
Edited by: Vinay Kumar Amruth on Feb 18, 2009 3:01 PM -
How do you calculate a date on a form?
I am working on a form for our customers and our staff to use and I needfor it to calculate a date from another date. We are currently using an Excel spreadsheet that is working very well, but we are starting to run into customers who do not have access to Excel. Having the form in Adobe would give us more flexibility.
Here is an example of exactly what I need:
Last Read Date: 01/01/00
Approximate Due Date_1: 01/26/00 (this is the Last Read Date + 26 days)
Approximate Due Date_2: 02/26/00 (this is the Last Read Date + 56 days)
Approximate Due Date_3: 03/26/00 (this is the Last Read Date + 85 days)
Thank youCheck out this previous topic: http://forums.adobe.com/thread/836872
-
Java.util.Calendar calculates wrong date when any duration is added
Hi friends,
I am trying to calculate the date through java.util.Calendar object and getting wrong value. Let me explain the scenario -
Scenario1:
I have taken start date and added some duration to that and expecting a new date which should be calculated as (start date+ duration). The value is as below -
start date = 2012-01-09 (9 January 2012 )
duration = 1year, 1month, 20 days
new date = 2013-02-28 ( 28 February 2013)
*Here new date I am expecting is 2013-03-01 (1 March 2013).
Scenario2:
I have taken another set of values as below -
start date = 2011-02-15 (15 February 2011)
duration = 1year, 1month, 15days
new date = 2012-03-30 (30 March 2012)
*Here new date is as expected.
Scenario1 data is giving me wrong result. Please let me know if any more information is required. Any help will be appriciated. Thanks in advance.
Edited by: user560316 on ९ जनवरी, २०१२ ६:२३ अपराह्न
Edited by: user560316 on ९ जनवरी, २०१२ ६:२४ अपराह्नIt all looks pretty straightforward to me. Try running the following code:
public class TestCalendar {
public static void main(String[] args) {
java.util.Calendar myDate = java.util.Calendar.getInstance();
java.text.DateFormat df = new java.text.SimpleDateFormat("dd MMMM yyyy");
myDate.set(2012, java.util.Calendar.JANUARY, 9);
System.out.println("Start date = " + df.format(myDate.getTime()));
myDate.add(java.util.Calendar.YEAR, 1);
myDate.add(java.util.Calendar.MONTH, 1);
myDate.add(java.util.Calendar.DAY_OF_MONTH, 20);
System.out.println("End date = " + df.format(myDate.getTime()));
}This gives the following result:
Start date = 09 January 2012
End date = 01 March 2013 -
How to calculate retirement date
Dear Guru.
i want to calculate the retirement date.
input for calculating retirement date is employee DOB.
from employee date of birth we need to add 58 years.
any standard function module is there for calculating retirement date.
please help me .Hello Shail,
You have to write the Dynamic Action in IT0002. So that when IT0002 is maintained, Dynamic action is triggered and IT0041 is created.
1) Let's say, there is a Date Type created for Retirement; Date Type = R1
2) to calculate the date you have to do following;
FC N0
S
Variable Function Part
=======================================
06
01
W
P0041-BEGDA=PSPAR-BEGDA
06
02
W
P0041-ENDDA='99991231'
06
03
W
P0041-DAR09='R1'
06
04
F
Get_Retirement_Date(ZHR_DYNROUTINE)
06
05
W
P0041-DAT09=RP50D-DATE1
3) Include "ZHR_DYNROUTINE" need to be created. Within this include a subroutine "Form Get_Retirement_Date.....Endform" need to be created.
4) Inside "Form Get_Retirement_Date.....Endform", you can write your code of the function module to calculate the Retirement date and then pass it in structure RP50D-DATE1;
RP50D-DATE1 = Retirement Date calculated from function
There is another option. You can also develop user exit ZXPADU02. If your hiring action infogroup has IT0041 included, then you can also do this calculation inside the user exit and populate it in IT0041 with correct date type. -
Am looking for either a javascript or formcalc that will run at the client level to calculate future dates based on input into a base date.
Example:
Input: 30 April 2005
Outputs:
Next Event: Monday, 15 May 2005 (base date + 15 days)
Next Event: Saturday, 29 June 2005 (base date + 45 days)I don't have such script but I have a few tips for you if you want to write a script that will do just that.
- First, you can refer to the "input" date/time field by:
inputDate = DateTimeField1.formattedValue;
- You can then parse the date/month/year values
var theYear = inputDate.substring(0,4);
var theMonth = inputDate.substring(5,7);
var theDay = inputDate.substring(8 );
- Create a JS date object, useful for date manipulation.
var dateObj = new Date();
var baseDate = dateObj.getDate();
var baseMonth = dateObj.getMonth();
var baseYear = dateObj.getYear() + 1900;
- Now you can implement a function called
displayFutureDate(baseDate,baseMonth,baseYear,numberOfDays,outputObj)
I leave the detailed implementation up to you. It would be a good and fun exercise.
Good luck! -
Hello there,
i don't know if it is really possible. But i was looking for the moveable holiday solution. I read always about the holiday script, that has a XML file as base for the holiday dates. But i want to calculate them on my own. I don't want the customer to change always the XML file.
In germany we have a couple of holiday dates that are not fixed every year (like easter). It is not really nice to edit the XML file every year for the new dates. Someone of you will say: "Put the holidays for the next 10-30 years into the script!".
Yes that can i do, but i will automate this
So my question, has anyone tried something like that? I'm at the point that i don't know how to calculate with dates. Here a example:
To calculate the next holiday, i have the easter sunday date calculated. Like 2011/24/04.
The next holiday is 49 days in the future. So i have to add 49 days to the date of easter. I hope you see my problem. How can i calculate this to be aware of the month.
Has anyone a idea? All posts are welcome!!!
ChristianHi Koen,
for the Easter, i googled a little bit around and found a couple of formulas to calculate the Easter Sunday. Here is the calculation:
Given is year
int c;
int i;
int j;
int k;
int l;
int n;
int EasterDay;
int EasterMonth;
string EasterDate;
c = year / 100;
n = year - 19 * ((int)(year / 19));
k = (c - 17) / 25;
i = c - c / 4 - ((int)(c - k) / 3) + 19 * n + 15;
i = i - 30 * ((int)(i / 30));
i = i - (i / 28) * ((int)(1 - (i / 28)) * ((int)(29 / (i + 1))) * ((int)(21 - n) / 11));
j = year + ((int)year / 4) + i + 2 - c + ((int)c / 4);
j = j - 7 * ((int)(j / 7));
l = i - j;
EasterMonth = 3 + ((int)(l + 40) / 44);
EasterDay = l + 28 - 31 * ((int)OsterMonat / 4);
EasterDate = EasterDay + "." + EasterMonth + "." year
This calculation did i in some SET Steps. Then i put the EasterDate in a Variable String. Works perfect.
But the calculation of the movable holidays is more complex as i thought. So as you say, i try to do this in Java. But i did not know anything about Java (
I will try to understand you example and work on this to do what i will ))
Greets
Christian -
How to calculate delivery date
Hello,
I'm trying to use a formatted search in a Sales Order to calculate the delivery date per row.
I found the following that could be my answer, but not sure how to proceed:
DATEADD (datepart, number, date)
Based on the item information on tab 'Planning' field Lead Time (OITM.LeadTime) I want to calculate the document date plus the Lead Time (or should I create a UDF?).
I did created the following query:
DATEADD(day, $[OITM.LeadTime], $[$10.0.DATE])
When running the query I get the following:
DATEADD(day, N'', CONVERT(DATETIME, '20080325', 112))
As you can see it didn't fill the 'number' with the leadtime information (which is 3 in my case).
And I receive the following error:
1). [Microsoft][SQL Native Client][SQL Server] Incorrect syntax near 'day'. 2).[Microsoft][SQL Native Client][SQL Server] Statement 'User-Defined Values'(CSHS) (s) could not be prepared.
How can I my result?
Regards,
PetronellaThis seems to work.
SELECT DATEADD(day, (SELECT LeadTime FROM OITM WHERE ItemCode = $[$38.1.0]), $[$10.0.DATE])
Regards,
Douglas -
How to calculate the data in bex
Dear all,
i have a service order no and it current active status and it time stamp details in my query
example
sevice orer no posting date name current active status active status date part aging
800000243 15.01.2009 shahina part despatched A 17.01.2007
in my ods i have
sevice orer no posting date name current active status active status date part aging
800000243 15.01.2009 shahina part despatched A 17.01.2007
800000243 15.01.2009 shahina part pending x 16.01.2007
800000243 15.01.2009 shahina part for asp x 17.01.2007
i want to calulate the aging of part pending to part despatched
17.01.2009 - 15-01.2009 = 2 days
i want to display in my bex like this
sevice orer no posting date name current active status active status date part aging
800000243 15.01.2009 shahina part despatched A 17.01.2007 2
( in bex report i want to display only active status )
can any one help me please to solve this issue
Regards
shahinaHi vamsi talluri ,
i working in crm reports ( service ) here i want to calulate the differance between the old status that is inactive status date to part despathed date
sevice orer no posting date name current active status active status date part aging
800000243 15.01.2009 shahina part despatched A 17.01.2007
in my ods i have
sevice orer no posting date name current active status active status date part aging
800000243 15.01.2009 shahina part despatched A 17.01.2007
800000243 15.01.2009 shahina part pending x 16.01.2007
800000243 15.01.2009 shahina part for asp x 13.01.2007
i want to calulate the aging of part pending to part despatched
17.01.2009 - 13-01.2009 = 4 days
i want to display in my bex like this
sevice orer no posting date name current active status active status date part aging
800000243 15.01.2009 shahina part despatched A 17.01.2007 4
in bex i am dispaying only active satus but i want calculate diff bet active status which i am dispalying in the bex analyzer and old status whaer the data are available in sercice order ods
please help me how to perform the calculation
Regards,
shahina..!
( in bex report i want to display only active status )
can any one help me please to solve this issue
Regards
shahina..!
Edited by: Shahina A on Jan 21, 2009 6:13 AM
Maybe you are looking for
-
HI ALL, IN RRI, WHAT IS THE MAXIMUM NO. OF QURIES WE CAN DRILL THROUGH FROM ONE QUERY? WILL IT BE POSSIBLE TO DISPLAY MORE THAN ONE QUERY IN ONE EXCEL SHEET? HOW TO FIND WHETHER THE TRANSACTION DATA HAS MASTER DATA? WHAT ARE TEXT VARIABLES, WHEN R TH
-
How do I remove an old apple id from ipod
How do I remove and old appleid from an ipod touch 4?
-
Smartforms - how to use page URL like output option ?
Hello, in the smartofms output options, there's the possibility to set BSP Page/URL: ...... and Output format: XSF output + HTML. My requisite is to send a form in XML via web service, can I use it ? How is run ? tks.
-
Content moderation in webcenter forum
I have set up my forum with moderation,so every new message will go through the moderator, The Moderation is working fine when we posting the message using Jive console, But its not working when we work with webcenter forum taskflow, When I post a me
-
Spilled alcohol on my macbook air
Hey i spilled pure alcohol on my macbook air (13inch). It wasnt too much and when it happened i put the computer upside down and tried to take as much the liquid off as I could. I thought it was everything under control because the computer seemed al