How to Calculate the Time Between two days in ABAP
Hi,
I have one scenario like i need to calculate the time between two days please can you suggest me.
Thanks,
Harinath
Hi Peeleti,
Check this code,
DATA : DATE1 LIKE SY-DATUM VALUE '19830125',
DATE2 LIKE SY-DATUM VALUE '20070219',
DAYS1 TYPE I,
WEEK1 TYPE I,
MONTH1 TYPE I,
YEAR1 TYPE I,
C_YEARS1 TYPE I.
CALL FUNCTION 'HR_99S_INTERVAL_BETWEEN_DATES'
EXPORTING
BEGDA = DATE1
endda = DATE2
TAB_MODE = ' '
IMPORTING
DAYS = DAYS1
C_WEEKS =
C_MONTHS = C_YEARS1
C_YEARS = C_YEARS1
WEEKS = WEEK1
MONTHS = MONTH1
YEARS = YEAR1.
D_MONTHS =
MONTH_TAB =
*WRITE : / 'DAYS = ', DAYS1,
/ 'WEEKS = ',WEEK1,
/ 'MONTHS = ', MONTH1,
/ 'YEARS = ', YEAR1.
Using this code you can calculate the No Of Days Between two dates. Based On days you will easily calculate the Hour. [ No of days * 24 ].
Thanks.
Reward If helpful.
Similar Messages
-
How to calculate the time between start trigger,first scan and first A/D in DAQ
Environment: Labview 6.1, N6052E DAQ board(max scan rate=333KHz, max channel rate=333KHz, settling time=3.5usec+1LSB)
I am using external scan clock 10K scan/s collecting data on 16 AI channels, and external channel clock 200KHz.
Could show me how to calculate the time betweent he start trigger, the first scan and the first A/D conversion?
ThanksI read the one you give to me. still cannot work out. I am using Labview 6.1 DAQ vi, including AI config.vi. clock config.vi, AI control.vi, AI read.vi, working on colect data on 16 AI channels. So I belong to SCAN function and external scan and sampling timing, right?
But it says the T1 and T2 are determined by external signals. How can I calculate that?
T1=1/10KHz or T1=1/160Khz?
T2=1/200KHz?
Is the above correct? -
How to Calculate the Space between two Characters in GDI + ?
I am Drawing the set of characters in Graphics, by Calculating the points using GraphicsPath for each Character. I Need to know how to calculate the distance should be given between the two characters?
I am using this code to generate points
PointF [] pnts;
var p=new GraphicsPath();
path.AddString("A","Arial",(int)FontStyle.Regular,50,new pointF(0f,0f),StringFormat.GenericDefault);
Matrix m=new Matric(1,0,0,1,0,0);
path.Flatten(m,1,0f);
pnts=path.pathpoints;
i am getting the points for all characters using the above code.
Now i am combining the two character Using the points generated by the above code. Eg "AB"
Help me to calculate the the character space should be given between two characters?
Thanks in Advance...Hi,
this link can assist you:>
Professional C# - Graphics with GDI+
Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP] -
How to calculate the difference between two dates?
Hello,
I would like to write some code which figures out how many days are between the Date_of_change (which is of datatype DATE, length 7 and of format DD-MON-YY) and the current date today. Then if the difference between Date_of_change and the current date is greater that 30 days for example then I would like to delete that record from the database.
Thanks
DougSomething like this should work:
SQL> select * from emp order by hiredate ;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7934 MILLER CLERK 7782 21-OCT-2005 1300 10
7902 FORD ANALYST 7566 22-OCT-2005 3000 20
7900 JAMES CLERK 7698 23-OCT-2005 950 30
7876 ADAMS CLERK 7788 24-OCT-2005 1100 20
7844 TURNER SALESMAN 7698 25-OCT-2005 1500 0 30
7839 KING PRESIDENT 26-OCT-2005 5000 10
7788 SCOTT ANALYST 7566 27-OCT-2005 3000 20
7782 CLARK MANAGER 7839 28-OCT-2005 2450 10
7698 BLAKE MANAGER 7839 29-OCT-2005 2850 30
7654 MARTIN SALESMAN 7698 30-OCT-2005 1250 1400 30
7566 JONES MANAGER 7839 31-OCT-2005 2975 20
7521 WARD SALESMAN 7698 01-NOV-2005 1250 500 30
7499 ALLEN SALESMAN 7698 02-NOV-2005 1600 300 30
7369 SMITH CLERK 7902 03-NOV-2005 800 20
14 rows selected.
SQL> delete from emp where hiredate < sysdate - 30 ;
10 rows deleted.
SQL> select * from emp order by hiredate ;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7566 JONES MANAGER 7839 31-OCT-2005 2975 20
7521 WARD SALESMAN 7698 01-NOV-2005 1250 500 30
7499 ALLEN SALESMAN 7698 02-NOV-2005 1600 300 30
7369 SMITH CLERK 7902 03-NOV-2005 800 20
4 rows selected.
SQL> -
How to calculate the time between triggering the signal and receiving back
i want the time elapsed between triggering the signal and receiving it back through a ultrasonic sensor in compactrio labview fpga.
thank you sir for your reply, but im working on fpga target cRIO-9082 chassis it wont support those palletes , yah if i dont work on fpga target then i can use those palletes ....in attaching the vi for generating a digital pulse and acquiring it back but yrt dint got any idea hot to determine the time...if the vi is wrong please make the neccessary changes. i used this vi to determine the total time between trigger and receving signal of ultrasonic sensor.
Thank you
Attachments:
pulse generation.vi 51 KB -
Calculate the Difference Between two dates excluding weekends and Holidays
Hi,
We need to calculate the difference between the two dates by excluding the Local public holidays (It is global and varies across countries) and weekends should not be included in calculation for a business day in OBIEE.
We have two dates: Open date and close date when ever close date is null we are calculating age based on taking the current timestamp and need to exclude the weekends and Holidays when ever the close date is null.
Ex:
Col1 col2 Total
11/9/2010 2:46:38 PM Null 13
11/2/2010 8:06:26 PM 11/3/2010 5:37:03 PM 1
(In the Total we shouldn't include the weekends,holidays)
Please let me know how to calculate the difference between two dates by excluding the weekends and holidays.
Thanks
Edited by: user10441472 on Nov 22, 2010 3:14 PMYou already asked this question and I answered it...
Re: calculation of Business day in OBIEE -
hello everyone,
i'm rai from indonesia
I have a final project about pulse oximetriy, I have some problems,
how to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops to calculate SpO2 ?
My program image can be seen below predicament ?
Attachments:
spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi 249 KBHi Rai,
You should post this into the LabVIEW forum rather than Real-Time since this isn't a Real-Time application. Your post will see more replies in the LabVIEW forum.
As far as your question is concerned, you can write the max and min from the respective loops to a local variable to send the data out of the loops to a third loop or just do the calculation in one of the loops. This would be ideal if you're trying to do this while the loop is running.
-Jayk
Applications Engineering
National Instruments -
Calculate the difference between two dates times in infopath form 2013
Hi,
I have an infopath 2013 form that contains three fields:
2 date time and the 3rd contains the difference between the two in hours
how I can make the difference between the two so that the display will be like this:
Date Time1 08/21/2014 22:00
Date Time2 08/22/2014 1:00
Diff Field 3:00Hi,
Please refer to the following article which matches your requirement exactly.
Calculate the difference between two date picker controls in InfoPath using rules and formulas - no code!
Please mark it answered, if your problem resolved. -
hello everyone,
i'm rai from indonesia
I have a final project about pulse oximetriy, I have some problems,
how to calculate the ratio between the maximum and minimum peaks of the two waves using two while loops to calculate SpO2 ?
My program image can be seen below predicament ?
Attachments:
spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi 249 KB
spo2 akusisi data with filter lpf hpf smoot nilai max min ir merah.vi 249 KBHi rai,
I would appreciate it as kind of respect for forum participants if you would clean up your VI before uploading it (or images of its block diagram)…
That being said:
- Your inner while loops each run exactly twice. Replace them with FOR loops!
- Lots of unneeded operations, mainly induced by ExpressVI usage. Is there a reason to convert to DDT and immediately convert back to 1D array?
- You already calculate some Min/Max values. Ratio is just a division of two values…
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
Calculate the difference between two dates
I would like to calculate the difference between two dates in PL/SQL and return the result as a number of days expressed as an integer value.
Denes,
A fair point, I should really have posted this on the SQL forum (I'm new to the forum as well as PL/SQL) but thanks for responding anyway. It does raise a question as to how to implement this in ApEx though.
I have created the function and am calling it as shown below from the source window of a form. The source type is 'PL/SQL expression or function' and the expression in the source window of the form is:
calc_date_difference (:p26_c_payment, :p26_c_rec)
The two parameters being passed are of type date but I'm not sure how to handle the ruturned number and populate the form in ApEx with this value.
Is it possible to do it this way or am I taking completely the wrong approach?
Regards
Sandy
This is not ApEx related but SQL related:
CREATE OR REPLACE FUNCTION calc_date_difference (
p_date_1 VARCHAR2,
p_date_2 VARCHAR2
RETURN NUMBER
v_difference NUMBER;
v_sql_err VARCHAR2 (4000);
BEGIN
v_difference := TRUNC (TO_DATE (p_date_1)) - TRUNC
(TO_DATE (p_date_2));
RETURN v_difference;
CEPTION
WHEN OTHERS
THEN
v_sql_err := SQLERRM || CHR (10) || CHR (10) ||
SQLCODE;
ND calc_date_difference;and
SQL> SELECT calc_date_difference ('23.01.2007',
'20.01.2007') diff
2 FROM DUAL;
DIFF
3
Denes Kubicek -
Calculate the variance between two row
Post Author: jane
CA Forum: WebIntelligence Reporting
Hi,
I'm new to BO and wondering whether there is a way to calculate the variance between two rows. I'm working on a report which requires to display the change of two day's data. For instance, I have a table in a format as
Date
Sales Amount
3/12/2008
2300.00
2/12/2008
1280.00
Changed
1020.00
I'd like to display the "Changed" column. Is there a way to do that in BO InfoView? In Excel, you can use the formular by identify the two cells.
Thanks!Post Author: Vinl
CA Forum: WebIntelligence Reporting
I am having the same problem and am steping outside of the box and cannot progress.
Seems to me that you are kind of saying that the only way to get around this is to create an individual object in Designer? I cannot find a way of cementing values as a variable in order for a variance to be created.
I am trying to do it at column level mind you, which should not make that much difference....
Simple SQL database. I have created an object called "Year" which takes a date and converts it to a year. I then have another object created "Total sales", put the 2 in a table get the right results...try and create a year on year variance from that...no chance...
Used to work ok...? -
In BADi , How to pass the values between two Method
Hi Experts,
We have two methods in BADis. How to pass the value between two Methods. Can you guys explain me out with one example...
Thanks & Regards,
Sivakumar SHi Sivakumar!
Create a function group.
Define global data (there is a similiar menu point to jump to the top include).
Create one or two function modules, with which you can read and write the global data.
In your BADI methods you can access the global data with help of your function modules. It will stay in memory through the whole transaction.
Regards,
Christian -
How to Break the cluster between Two servers
Hi Experts,
Since Iu2019m new to BOBJ XI R2.I would like to know how to break the cluster between two servers.
Description :
So far we took the copy of QAS Server1 to the new QAS server2 (Through Mirroring Tool ). Now those two servers are cluster together, I can see QAS server1 CMS Name, Cluster Name, cluster member name in QAS Server2 (CMC-> Setting -> Cluster).
Besides in QAS Server1 CMS Name and Cluster name are pointing to the QAS Server1, except Cluster Member (This is still have two members Server1 and Server2).(CMC-> Setting -> Cluster).
In QAS Server1 and QAS Server2 (CMS-> Servers), I can able see both server name under Machine Name tab.
I would like to make those two servers as independent servers. There are two different data source for those two servers. I want to remove the cluster in both servers.
Right now QAS Server1 is running and QAS Server2 is stopped.
If i create/modify a group under new Mapped NT Member Groups in QAS server2 ,it is getting reflecting in QAS server 1.
Could you please tell me the steps to resolve this problem.
BO Version: BO XI R2
Regards,
SridharanHi,
Maybe the external CMS is still 'attached' to your SIA node. Please go to the CCM (Central Configuration Manager) and stop the SIA (Server Intelligent Agent). On one of the tabs you can see if there is an external CMS part of your environment. Delete it and restart the SIA. Retry if you can delete the services now from within your CMS. It may well be that you have to stop both environments and delete each others CMS via the CCM to get it working. If you have not changed any permissions for your Administrator account the security model will not be the one causing this.
Hope this helps...
Martijn van Foeken
Focuzz BI Services
http://www.focuzz.nl
http://nl.linkedin.com/in/martijnvanfoeken -
How to share the data between two or more frames
How to share the data between two or more frames based on the database relationship in JDeveloper?
You can pass data between frames by passing it as parameters.
That is when you are invoking another frame, pass your data as arguments through the constructor to that frame .
You can also achieve this through static or public methods, but static variables as we know is not suggested which might occupy more memory space.
Regards,
Srinivasan AShwath
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by [email protected]:
How to share the data between two or more frames based on the database relationship in JDeveloper? <HR></BLOCKQUOTE>
null -
How to calculate the Time difference between 2 dates
HI All,
I am using HR_hk_diff_btw_2_dates to calculate the employee service dates.
For that i am inputing his hire date and Term dates and Output format as '05' i am getting output perfectly....
But problem is whe i am inputting the employee hire date is Dec 1 2007 and Term date is
March 31 2009 It is coming as 1 year 3 months 31 days instead of 1 year 4 months directly .......How could we make it make last date also working day and get the O/p as 1 year 4 months ?Please Advice..
Regard
sas1. FM for difference betwwen two times:SCOV_TIME_DIFF
Import parameters Value
IM_DATE1 2008-01-01
IM_DATE2 2008-01-01
IM_TIME1 10:00:00
IM_TIME2 11:30:00
Export parameters Value
EX_DAYS 0
EX_TIME 01:30:00
2. SD_CALC_DURATION_FROM_DATETIME : Finds the difference between two date/time and report the difference in hours
L_MC_TIME_DIFFERENCE : Finds the time difference between two date/time
Maybe you are looking for
-
Whih table i can get sap username and sap mail id?
Hi experts which table can i get username and user-mail id . i need to pick the username(BNAME) data based on the user mail id (SMTP_ADDR). could any one tell the table name where both fields are avaialble. Thanks.
-
I read this kb - http://support.microsoft.com/kb/2681562/en-us, but doesn't get exact answer. I need to install vWorkspace 8 on server w2k12. It install SQL Server 2008 Express during installation and I got error. So, is it possible to install Micros
-
I need to import data from a CSV file to an Oracle table
I need to import data from a CSV file to an Oracle table. I'd prefer to use either SQL Developer or SQL Plus code. As an example, my target database is HH910TS2, server is ADDb0001, my dB login is em/em, the Oracle table is AE1 and the CSV file is AE
-
Hi All, In one of our system brtools is not working and giving the following error. None of the brtools function is working at present...plz help me to resolve this issue BR0051I BRBACKUP 7.00 (13) BR0252E Function fopen() failed for 'C:\Oracle\produ
-
Lo peeps, I have a small problem, i'm trying to create a random number generator and create a list of size current_size. The code also generates the random number from zero to current_size. The following code seems to work correctly in generating a r