How to get correct number of hours from a total calculated hours
Hi all
I'm trying to calculate the number of actual hours.
so the hours look like this
A: 1hr 30min
B: 1hr 40min
if i add those up i get
C: 2hr 70min (ie 1.30+1.40=2.70)
however, I want to actually display the actual hours which is
3hr 10min
I had the idea of turning the hours into seconds
ie 1.30+1.40=2.70 ----> 2.70*60*60 = number of seconds
now am i on the right track and if so, how do i turn these seconds now into the right hours?
It is not suppossed to. It was illustrating the difference between 2.7 and 2 hours, 70 minutes, which is approx. 3.165.
You do see the difference between
2.7 * 60 * 60and
((2*60) + 70) * 60right?
Edit: The answer to your first post, was the first line of my first reply.
Similar Messages
-
How to get customer number and name from the SD document
Hi All,
Can you please let me know how to get Customer Number and Name from the SD Document?
Thanks a lot....
AnilHi,
It will be displayed in the SD (BIlling document) itself, you clikc on the VF03. The customer name and number will also appear in the SO document also Tcode VA03
regards,
radhika
Edited by: kolipara radhika on Jul 10, 2009 5:32 AM -
How to get correct order of bookmarks from Word headings+styles?
I have a Word document that uses Headings and styles in a non-standard way. Specifically, Heading1 and Heading2 are used as level 1 headings, and other word styles - h2-a, h2-b are used as level 2 headings. Create PDF used to work fine under Windows XP with Acrobat X and Word 2007. Once I upgraded to Windows 7, the bookmarks come out in the order of the heading names, not the order of their appearance in the document. I'm using 32 bit version of Word and Acrobat.
Need this done urgently. ThanksActually, I just tried this on a Windows XP system, and am having the same problem. So either some updates made to the doc caused this, or I was previously using Word 2003 and/or Acrobat 6, which worked. The document was in "Word 97-2003" format. I just tried saving it as Word 2007 .docx, and still have the issue.
-
How to get the Number of ASA Acces-listen total
Hi
Any Idea how to collect from each Firewall the total number of Access-lists ?
To Optimize and to clean all my ACLs from all Firewall I want to start with this firewall which has the highest number of ACLs.
Any way to get it via snmp , RME report or script ?
thx in advancedYou're talking in terms of access control entries, correct? As in how long an ACL is when flattened. If so, then you could presumably write a script to parse out the element number shown from a "show access-list." I'm not aware of a pollable OID that can be viewed via SNMP.
Best,
Chris -
How to get week number from date
Hi,
please mention how to get the number of week from a particular date using fn module?Hi Debarshi,
Use FM <b>DATE_GET_WEEK</b>
Reward points if helpful.
Regards,
Hemant -
How to read particular number or word from lengthy serial data
Serially getting lengthy data...how to get particular number or word from Tht
Omi_30 wrote:
I am getting continusly 3 measured voltages,currentso,powers over serial..those values over serial are separated by spaces
Are the numbers in ASCII? Use the Spreadsheet String to Array function. Wire in a space constant to the delimiter and a 1D array of doubles to the array type. You can then use Index Array to get the value you want.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
How to get row number of selected entry from OVS search result
Hi,
Anyone having any idea on how to get row number of the selected entry/ how to differentiate rows in OVS search result in ON_OVS method?
Regards,
JatinHi,
You can get the selected record to <ls_selection> structure in co phase 3.
From that structure you can get what ever field you want.,
check the below code for reference,
<< Moderator message - Cut and paste response from F4 help for ALV table field removed. Plagiarism is not allowed in SCN >>
hope this helps u.,
Thanks & Regards,
Kiran
Edited by: Rob Burbank on Jan 5, 2012 5:24 PM -
How to get the number of rows in a ResultSet
Hello,
I'm an intern and I'm trying to get the number of rows from result set in oracle using rs.last() and rs.beforeFirst() methods
but I got an error. Could Below is my sample code:
import java.sql.*;
public class SarueckConnect {
public static void main(String[] args) {
Connection con = null;
Statement stmt = null;
ResultSet re = null;
String[] ParamArray;
ParamArray = new String[24];
//Properties logon;
try {
Class.forName("oracle.jdbc.driver.OracleDriver"); //Loading the Oracle Driver.
con = DriverManager.getConnection
("jdbc:oracle:thin:@258.8.159.215:1521:test_DB","data","data"); //making the connection DB.
stmt = con.createStatement ();// Sending a query string to the database
//stmt.executeUpdate("UPDATE test_table set steuk = 6 WHERE steuk = 5");
ResultSet rs = stmt.executeQuery("SELECT mandt,kokrs,werks,arbpl,aufnr,vornr,ile01,"+
"lsa01,ism01,ile02,lsa02,ism02,ile03,lsa03,ism03,ile04,lsa04,ism04,steuk,matnr,budat,"+
"kostl,pernr,rueckid FROM test_table where steuk =6");
//Print the result out.
rs.last(); //This is the line which gives an error.
int rows = rs.getRow();
rs.beforeFirst();// I presume this is wrong to.
ParamArray = new String[24*rows];
int counter=0;
while (rs.next()) {
for (int i = 1; i <= 24; i++){
ParamArray[i-1+(counter*24)] = rs.getString(i);
System.out.print(rs.getString(i) + '\t');
System.out.println();
counter++;
} catch(Exception e) {
e.printStackTrace();
} finally {
try
if(stmt != null) stmt.close();
if(con != null) con.close();
} catch (Exception exception) {
exception.printStackTrace();
TryBapi sap = new TryBapi(ParamArray);
}When I run the code I do have the following ERROR Message:
java.sql.SQLException: Invalid operation for forward only resultset : last
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.driver.BaseResultSet.last(BaseResultSet.java:91)
at SarueckConnect.main(SarueckConnect.java:28)Please could any body Help me out here to figure out how to correct this?
Any Help would be highly apprecited.make your result set scrollable...Not such a good idea. With Oracle, the JDBC driver will read and cache all the ResultSet in memory (with other DBMSs/drivers the behavior will probably be different, but you will still have some unnecessary overhead).
You can do the caching yourself if you think it's worth it. If the piece of code you posted is why you need this for, then use a List or Vector and you won't need to know the size upfront.
Alin,
The jTDS Project. -
Get nth number of sets from user in proper set format in C#
how to take nth number of sets from user using string type list in C#.
Each set should be in this format {1, 2 , 3, ab,....nth }.
User can enter nth number of item in each set
then count the number of item in each set
Waiting for you answersI think you still not got my point. okay once again i explain you what i want.
User Enter set in WPF window in this format e.g {1,2,3,ab},{ab,cd,1,2}.
User can enter nth number of set.
User can enter nth number of elements\ items in each set.
Count the number of elements in each set.
Hopefully now you got my point
If I understand you correctly, you want to get the number based on the string like "{1,2,3,ab},{ab,cd,1,2}". Maybe you could try Regular Expression:
https://msdn.microsoft.com/en-us/library/az24scfc%28v=vs.110%29.aspx
For example this code snippet is able to count the set numbers and element numbers for you:
string input = "{1,2,3,ab},{ab,cd,1,2}";
string pattern1 = @"{.*?}";
string pattern2 = @"\w+,?";
Regex reg = new Regex(pattern1);
MatchCollection mc1 = reg.Matches(input);
Console.WriteLine("Number of set:" + mc1.Count);
for (int i = 0; i < mc1.Count; i++)
reg = new Regex(pattern2);
MatchCollection mc2 = reg.Matches(mc1[i].Value);
Console.WriteLine("Set " + (i + 1) + " element number:" + mc2.Count);
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to get the number of rows in a repeating frame ?
Hi all,
When I launch a report from forms then sometimes there are data in the report and sometimes there are no data. And the problem is that when there are no data then the frame containing the repeating frame is still displaying and a blank page displays on the report.
So I want to get the number of rows from the repeating frame so that I can code a format trigger on the frame to display or not the enclosing frame depending on the existence of data from the repeating frame.
Thank you very much indeed.Dear Friend,
You can achieve this. Define a summary column (say cnt). Select summary type as "COUNT". select any one of columns that are getting displayed in your repeating frame as summary column and provide "reset at" group name (or set this to report if you are defining this field at report level) . This "cnt" variable will contain how many records that will be fetched for your repeating frame (i.e. Group of Repeating frame). You can use this "CNT" variable in your format trigger.
In this case there is no need to write before report trigger or anything.
Regards,
Manish Trivedi -
How to get the number of files currently open?
hi,
does any one know how to get the number of files currently open in windows OS?
e.g. lets say .txt files...
any comment will be really appreciated.
thanksAssuming that you don't want to actually do this from within Java code (which would obviously require native code), here's a utility that will give you a list of which file handles are opened by which processes (on Windows):
http://www.sysinternals.com/ntw2k/freeware/handle.shtml
- K -
How to get the number of elements in DB
Could you tell me how to get the number of elements in DB??
My code to get the number is below, but I think it is not efficient
DB->cursor(DB, NULL, &cursorp, 0);
while ((ret = cursorp->c_get(cursorp, &key, &data, DB_NEXT)) == 0)
count++;
--------------------------------------------------------------------------------------------------------------Hi,
The most efficient way to get a count from the database is using the DB->stat API (http://docs.oracle.com/cd/E17076_02/html/api_reference/C/dbstat.html)
The code will be something like:
DB *dbp;
DB_BTREE_STAT *statp;
int ret;
/* Print out the number of records in the database. */
if ((ret = dbp->stat(dbp, NULL, &statp, 0)) != 0) {
dbp->err(dbp, ret, "DB->stat");
goto err1;
printf("%s: database contains %lu records\n",
progname, (u_long)statp->bt_ndata);
free(statp);The code comes from the example included in the distribution at examples/c/ex_btrec.c
If the database isn't a btree, you should update to the appropriate statistics structure and field.
It's worth noting that retrieving the count is never a "cheap" operation. The count is not stored in the database - since doing so introduced a single point of contention that creates a bottle neck.
Regards,
Alex Gorrod
Oracle Berkeley DB -
How to get the number of messages consumed by a MDB ??
Hi all,
How to get the number of messages consumed by a MDB displayed in OEM in a Java Application ???
DMS ??? what use DMS ???
tanksok.
Well using DMS is one way to get at these sorts of stats in a programmatic manner.
There's a Java API you can use, or you could call out to the Spy servlet to query the DMS stats in either text or XML form.
I don't have an MDB published so I can't show you specifiically, but here's the sort of query you can use to extract the data.
http://localhost:8888/dms0/Spy?format=raw&table=oc4j_ejb_stateless_bean&recurse=children
Which produces a table of the TEXT form:
<DMSDUMP version='9.0.4' timestamp='1163456821185 (Tue Nov 14 08:57:01 CST 2006)' id='8888' name='OC4J'>
<statistics>
/oc4j [type=n/a]
/oc4j/default [type=oc4j_ear]
/oc4j/default/EJBs [type=oc4j_ejb]
/oc4j/default/EJBs/jmsrouter_ejb [type=oc4j_ejb_pkg]
/oc4j/default/EJBs/jmsrouter_ejb/AdminMgrBean [type=oc4j_ejb_stateless_bean]
pooled.count: 11 ops
pooled.maxValue: 1 count
pooled.minValue: 0 count
pooled.value: 0 count
ready.count: 11 ops
ready.maxValue: 1 count
ready.minValue: 0 count
ready.value: 0 count
session-type.value: Stateless
transaction-type.value: Bean
/oc4j/default/EJBs/jmsrouter_ejb/EnqueuerBean [type=oc4j_ejb_stateless_bean]
pooled.count: 11 ops
pooled.maxValue: 0 count
pooled.minValue: 0 count
pooled.value: 0 count
ready.count: 11 ops
ready.maxValue: 0 count
ready.minValue: 0 count
ready.value: 0 count
session-type.value: Stateless
transaction-type.value: Bean
/oc4j/default/EJBs/jmsrouter_ejb/TimerHandlerBean [type=oc4j_ejb_stateless_bean]
pooled.count: 11 ops
pooled.maxValue: 0 count
pooled.minValue: 0 count
pooled.value: 0 count
ready.count: 11 ops
ready.maxValue: 0 count
ready.minValue: 0 count
ready.value: 0 count
session-type.value: Stateless
transaction-type.value: Bean
</statistics>
</DMSDUMP>
Or produces an XML document of the form:
http://localhost:8888/dms0/Spy?format=xml&table=oc4j_ejb_stateless_bean&recurse=children
You can use the Spy console to find the table that contains the details for MDB and then take it from there.
This is not what you specifically want to do, but it does provide a good overview of how DMS is used.
http://www.oracle.com/technology/pub/notes/technote_dms.html
-steve- -
How To get the number of request's for a single Composite Application
Hi can any body tell how to get the number requst's for a single composite application.
Thanks
ManiHi,
There are lots of STATE is available for composite instances, like mentioned in the below query. I hope you will get answer from the below query.
SELECT (CASE WHEN STATE=1 THEN 'OPEN AND RUNNING'
WHEN STATE=2 THEN 'OPEN AND SUSPENDED'
WHEN STATE=3 THEN 'OPEN AND FAULTED'
WHEN STATE=4 THEN 'CLOSED AND PENDING'
WHEN STATE=5 THEN 'CLOSED AND COMPLETED'
WHEN STATE=6 THEN 'CLOSED AND FAULTED'
WHEN STATE=7 THEN 'CLOSED AND CANCELLED'
WHEN STATE=8 THEN 'CLOSED AND ABORTED'
WHEN STATE=9 THEN 'CLOSED AND STALE'
WHEN STATE=10 THEN 'NON-RECOVERABLE'
ELSE STATE || ''
END) AS STATE, component_name, COUNT(*) AS NUM_OF_CUBE_INST FROM CUBE_INSTANCE where composite_name='PASS THE COMPOSITE NAME HERE..........'
group by (CASE WHEN STATE=1 THEN 'OPEN AND RUNNING'
WHEN STATE=2 THEN 'OPEN AND SUSPENDED'
WHEN STATE=3 THEN 'OPEN AND FAULTED'
WHEN STATE=4 THEN 'CLOSED AND PENDING'
WHEN STATE=5 THEN 'CLOSED AND COMPLETED'
WHEN STATE=6 THEN 'CLOSED AND FAULTED'
WHEN STATE=7 THEN 'CLOSED AND CANCELLED'
WHEN STATE=8 THEN 'CLOSED AND ABORTED'
WHEN STATE=9 THEN 'CLOSED AND STALE'
WHEN STATE=10 THEN 'NON-RECOVERABLE'
ELSE STATE || ''
END), component_name;
Thanks,
Vijay -
How can get batch number in process order?(T-code: COR1, COR2)
Please tell me step by step process it will be better to me the solve my issue.
When End-user uses alread existed batch number,
Pop-up Message,
"Your batch number is already exist.
Are you creating new batch number?"
If the answer is "No",
System still uses that batch number.
And User-Exits, or bodies don't exist this time.
How can I get this batch number When saving in process order?
I uses User-Exits "SAPLV1ZE" in Batch Number Check,
"PPCO0007" and "PPCO0001" in saving process order.
I know "PPCO0001" has all information about process order,
but I can't get batch number to "PPCO0007" From "PPCO0001" by using Memory ID.
Cause PPCO0007 happens before PPCO0001.
(ref. PPCO0007 can stop saving in process order.)
I want to know how can I get batch number when pop-up message's answer is "No".
I have to send this batch number to PPCO0007 by using Memory ID.
Please, help me.
Edited by: Jamie White 99 on Mar 15, 2010 11:00 AMDear,
Could you please clear your requirement in brief?
You don't want to use the existing batch number or want to assign external batch number or want unique batch number?
Use SAPLV1ZE and EXIT_SAPLV01Z_003 where you can replace the proposed number range with external interval defined by yourself.Also using EXIT_SAPLV01Z_004 you can define your own checking rule.
Further information can be obtained from the documentation on the enhancements
Also refer this link,
http://help.sap.com/saphelp_40b/helpdata/ru/dc/1d4b6e5733d1118b3f0060b03ca329/content.htm
Re: External batch assignment( Manual)
Regards,
R.Brahmankar
Maybe you are looking for
-
Can't get playlists from one one computer to another. Confident Home Sharing is turned on correctly. Have imac and macbook Air and Lion. Using smart lists.
-
Acrobat 9 Pro: Importing large Word-Documents
Hello together! I have a big problem with my doctorate thesis. I would like to import a large Word-Document (2.28 MB, about 300 pages) into Acrobat 9 Pro. That doesn't work at all. I can't beleave it. Is Adobe even worse than Microsoft?????!!!!!!!! I
-
I can't find my serial number. Where do I call?
I was trying to install Adobe Camera Raw 6.6 and it gives an error. The Adobe tech gave me a link to a newer version of ps. It installed fine and also acr 6.6 but it wants a serial number and I can't find it.... thanks for the help. Steve
-
Keyword suggestions not working
Have upgraded v2 from 1.41 so far without any major problems. However, the keyword suggestions from recent values (autofill) doesn't work with newly applied or old keywords. The box in Catalog Settings is ticked. Should I click on Clear All Suggestio
-
Hello! I'm trying to install Portal 11g so that I need to install OID but when I'm configuring OID appears this error: Error creating ASInstance asinst_1 Cause: An internal operation has failed: Error in starting opmn server Operation aborted because