How to take the value as seconds place[hh.mm.ss]

double parseTime=10;
here i am getting parseTime as 10
so i should take 10 in the place of seconds place[hh.mm.ss]
Ex:00.00.10
how i should take ,any help regarding this

raki1221 wrote:
so i should take 10 in the place of seconds place[hh.mm.ss]
Ex:00.00.10Have a look at the [Joda Time API|http://joda-time.sourceforge.net/], which has objects representing intervals, durations, and periods.
Example:
ReadablePeriod p = Seconds.seconds(10);
PeriodFormatter pf = new PeriodFormatterBuilder()
          .printZeroAlways()
          .minimumPrintedDigits(2)
          .appendHours()
          .appendSeparator(".")
          .appendMinutes()
          .appendSeparator(".")
          .appendSeconds()
          .toFormatter();
assert "00.00.10".equals(pf.print(p));~

Similar Messages

  • How to take the values from a  String ( CSV   values).

    Hi All,
    I am passing csv String to a procedure as in parameter,but I have to take the values from a csv String one by one.Please let me know Is there any StringTokenizer function in oracle to take values like in java. Here is my javacode.
    import java.util.StringTokenizer;
    public class Sample {
         public static void main(String[] args) {
              String s="one,two,three,four,five";
              StringTokenizer stringTokenizer=new StringTokenizer(s,",");
              System.out.println( stringTokenizer.countTokens());
              System.out.println(stringTokenizer.hasMoreTokens());
              while(stringTokenizer.hasMoreTokens()){
                        System.out.print(stringTokenizer.nextToken());
    o/p: one two three four five

    Something based around one of these two methods should assist...
    select substr( the_string 
                  , decode( level, 1, 1, instr(the_string,',',1,level-1)+1)
                  , decode( instr(the_string,',',1,level), 0, length(the_string), instr(the_string,',',1,level) - decode( level, 1, 0, instr(the_string,',',1,level-1))-1)
                  ) the_value
                  from ( select '10,12,20,30,30,3,12,12,56' the_string
                         from dual
                  connect by level < length(replace(translate(the_string,'01234567890','00000000000'),'0')) + 2
    or
    SQL> select REGEXP_SUBSTR ('a,b,c,d,e', '[^,]+', 1, level) from dual connect by level<=5
      2  /
    REGEXP_SU
    a
    b
    c
    d
    e
    SQL>

  • How to determine the value of  -D__SUNPRO_CC?

    Could any body tell me how to determine the value of -D__SUNPRO_CC? Iam now using Sun Studio 9.
    Thanks in advance.

    The C++ Users Guide describes all the predefined macros set by the compiler.
    The __SUNPRO_CC macro is a 3-digit hex number. The first digit is the C++ compiler major version number, which is 5 for all releases from WorkShop 5 in 1998 through the current release, Sun Studio 10. The second digit is the minor version number, increasing by 1 for each release in the major release series. The 3rd digit is a place holder for the very rare (none since 1994) cases when we have a micro version number. It is zero in current releases.
    The current compiler release is C++ 5.7, so __SUNPRO_CC is set to 0x570.
    You can see the macro setting by running
    CC -dryrun -c foo.cc
    and look for the -D__SUNPRO_CC =0xNNN on the ccfe command line.

  • How to find the value of a variable in other program

    How to find the value of a variable in other program say I am in a FM and this FM is being called in from other program and I want to know some of the variable details of the program from the FM itself. Imagine if this is a txn. and I need to know the details from some of the programs while executing the same transaction
    Regards
    Vin

    Hi Vinayak,
         you will be having your first program values in internal table or some variables,
        when you are calling the second program you wii use like this,
        SUBMIT <Second Program Name> USING SELECTION-SCREEN '1000'
                           WITH s_emp(second program select-options)   IN t_emp(first program variables)
                           WITH p_chk   EQ t_chk
                           WITH p_r1    EQ t_r1
                           WITH p_month EQ t_month
                           WITH s_cust1 IN t_cust1
                           WITH p_r2    EQ t_r2
                           WITH s_cust2 IN t_cust2
                           WITH s_week  IN t_week
                           AND RETURN.
    you have pas like this to get your first program details.

  • How to get the values from repeated frame?.

    Hi
    how to get the values from repeated frame?. i have to disply the first 3 digits in another place in my report.
    i have field empno in repeated frame and i want to disply first 3 digits in another place in the same report.
    thanks

    How often do you need to display it? It sounds like you might want to base a summary on that formula with a function of first or last. If it's a per page basis, it can be a page level summary. If it's at a higher level repeating frame, then you can create the summary at that level. I'd suggest taking a look at the online help for summaries using the first/last functions.
    Hope that helps,
    Toby

  • How to get the values of 2 dynamic comboboxes in one jsp to another jsp?

    I have 2 comboboxes and one submit button on my jsp page.I select a value in 1st combobox then the values in the second combobox populated from the database. next i select 2nd combobox and then submit the button.After submit the button call the next jsp page. In that page i want to display the values of two comboboxes. but my problem is , in that page only 2nd combobox value is displayed.1st combobox is displayed as null. plz tell me, how to get the values of two comboboxes at a time?
    Select.jsp:
    <%@ page language="java" import="java.sql.*" %>
    <%!
         Connection con = null;
         Statement  st  = null;
         ResultSet  rs  = null;
         String     sql = null;
         void addItems(javax.servlet.jsp.JspWriter out, String sql)
           try{     
              rs = st.executeQuery(sql);
              while( rs.next() )
                   out.println("<option>" + rs.getString(1) + "</option>");               
         }catch(Exception e)
                   System.out.println(e);
    %>
    <HTML>
    <HEAD>
    <TITLE>JSP WITH  MULTIPLE FORMS</TITLE>
    <script language="javascript">
              function checking()
                        form1.submit();
         </script>
    </HEAD>
         <body>
             <center>
             <b><font size="5" color="#333399">Staff ID:</font></b></center>
                     <FORM NAME="form1" METHOD="POST" ACTION="Select.jsp">
                         <p align=center>
                         Details of Staff :  
                       <SELECT 1 NAME="type" onchange="checking();">
                                    <option> Administrator </option>
                              <option> OfficeAssistent </option>
                              <option> Clerk </option>
                                  </SELECT 1>
                          </p>
    </FORM>
                      <FORM NAME="form2" METHOD="POST" action="welcome1.jsp">
                      <center>
                          <TABLE><TR><TD>Staff ID:</TD>
                                 <TD><SELECT 2 NAME="staff_id">
                    <%    
            String type = request.getParameter("type");
            try {
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            con = DriverManager.getConnection("jdbc:odbc:java","system","manager");
            catch (ClassNotFoundException ex) {
                   System.out.println(ex);
            catch (SQLException ex)
                System.out.println(ex);
         st  = con.createStatement();
         sql = "select staff_id from "+type+"";
         addItems(out, sql);
    %>
              </SELECT 2>
           </TD>
         </TR>
    </table></center>
    <h2> Details of <%= type + "s" %> </h2>
                         <center><input type=submit value=ok onclick="submit();"></center>
                  </FORM>
         </BODY>
    </HTML>
    welcome1.jsp
    <center><h1>WEL COME</h1></center>
    <%    
            String type = request.getParameter("type");
            String sid = request.getParameter("staff_id");
    %>
    <h2> Details of <%= type + "s" %> </h2>
    <h2> Details of <%= sid %> </h2>

    <SELECT 1 NAME="type" onchange="checking();">
                                    <option value = "0"> Administrator </option>
                              <option value = "1"> OfficeAssistent </option>
                              <option value = "2"> Clerk </option>
                                  </SELECT 1>

  • How to set the number of seconds a servlet is allowed to run

    I use JSP to generate a report, but it will take about 10 minutes to search.
    IE Client screen displays an error message what is "Cannot find out your page" after 8 minutes. How to set the number of seconds a servlet is allowed to run.

    It's not a matter of how long the servlet is running... it's the browser timing out because the servlet hasn't responded to its request.
    You have several options:
    1) "Browser Pinging"
    Your servlet sends some small data which can be either seen or unseen (html comments, hidden chars, etc) by the user at short intervals while your report is running. When the report is finished, the browser will not have timed out because it has been "snacking" on those small bits of data which tell the browser its original request was both heard and being handled. I don't think there is any timeout in IE as long as it receives data continually (or at least before its own timeout mark over and over again...)
    2) Multithreaded processing
    This would probably be a better approach. Have the report run in a separate thread running on the server. You'd want to store a reference to this executing report in the user's session. Instead of making the browser wait for the report to be finished, have the servlet check the user's session to see if a report exists and is running. If one does not exist, create one and start its execution. If one does exist, and is still running, print a "please wait" type of message OR an animation, etc... along with some javascript which will reload the page every few seconds. If the page reloads and the servlet sees that the report is finished, it can then display it to the user.
    Hope this helps,
    -Scott

  • How to get the number of decimal places configured for a site column

    Hi,
    I have a column 'SampleNumCol' of type Number, the number of decimal places to be displayed is configured as 2.
    The column conatins a value, but when retrieved programatically is displayed as 5.00000000  instead of 5.00.
    I am retrieving this column using listitem.Properties[field.InternalName].
    I need to trim the decimals based on  number of decimal places configured for the site column.
    How to get the number of decimal places configured for a site column?
    Thanks in advance,
    dhijit

    Get the field as SPFieldNumber and then check DisplayFormat which returns
    SPNumberFormatTypes
    SPFieldNumber numberField = list.Fields.GetFieldByInternalName("YourNumberFieldName") as SPFieldNumber;
    SPNumberFormatTypes numFormatType = numberField.DisplayFormat;

  • Please help me how to take the "Spot Color" in illustrator?

    Hi,
    Please help me how to take the "spot color in illustrator CS" using vb script (or) java script.
    Regards,
    Prabudass E.

    Prabudass,<br /><br />If you are just wanting to see if the illustrator file uses spot colors - run the Delete Unused Panel items from the default actions. then view the swatch palette in small or large List View. The color names that have a square containing a gray circle (spot) to the right of their color names are spot colors. <br /><br />The following will get the spot color name of an existing swatch named "Color1" and change it to "Nicks Swatch" and will assign the CMYK values stated.<br /><br />if (app.documents.length > 0){<br />var swatches = app.activeDocument.spots;<br />for(i=0;i<swatches.length;i++){ var currSwatch = swatches[i]; if(currSwatch.name == "Color1")<br />{currSwatch.name = "Nicks Swatch";<br />     var newColor = new CMYKColor(); <br />     newColor.cyan = 35; newColor.magenta = 0; <br />     newColor.yellow = 50; <br />     newColor.black = 0; <br />     currSwatch.color = newColor; } }}<br /><br />When this script has run the swatch palette will not immediately reflect the changes to the swatch name until you double click on a swatch and click OK or Cancel in the Edit Swatch dialog.<br /><br />I hope that I have understood your question correctly and that these responses are helpful.<br /><br />Good Luck<br /><br />Nick

  • How to read the value of Non-Linear Transforme​r ?

    Hi there !
    I know that we could make "modified" transformer for special purpose (with Vsec=5V for example). But, instead of make a new transformer, it might be more easier if we could know how to read the value of those transformer. For example, NLT_PQ_4_120 or NLT_PQ_4_10. To be narrowed, what is the meaning of 4_120 and 4_10 ?
    Anyone ?
    Ghost Recon Team Leader

    To understand the models you mentioned you need to understand XSPICE.  I suggest you use the virtual transformer instead because it is easy to change the turn ratio, you can double clicking on the component and enter what ever ratio you want.  This component is found  by selecting the menu PlaceàComponent
    Group: Basic
    Family: Basic Virtual
    Component: TS Virtual
    Tien
    Tien P.
    National Instruments

  • My Jbutton do not take the values of the checkboxes...PLEASE help...

    public class  buttonHandler implements ActionListener
            public void actionPerformed(ActionEvent event)
                if(event.getSource()== next)
                    pieChart.Chart();
                    pieChart.setTitle ("Display Chart");
                    pieChart.pack();
                    pieChart.show();
                    pieChart.setSize(500, 500);
                    pieChart.setVisible(true);
                }else if (event.getSource()==graduate && graduate.isSelected())
                          PieChart2D chart2D = new PieChart2D();
                          LegendProperties legendProps = new LegendProperties();
                          String[] legendLabels = {"UnderGraduate", "PostGraduate"};
                          legendProps.setLegendLabelsTexts (legendLabels);
                          numSets = 2;
                          numCats = 1;
                          numItems = 1;
                          Dataset dataset = new Dataset (numSets, numCats, numItems);
                          dataset.set (0, 0, 0, file.uGraduate.length()/13);
                          dataset.set (1, 0, 0, file.pGraduate.length()/12);
                          chart2D.setLegendProperties (legendProps);
                          chart2D.setDataset (dataset);
                } I am trying to get the Jbutton to take the values of the checkbox but i can't make. This is what is have so far. If the values from the check box are in the class the button indicate to the piechart is diplayed. I have registered some more checkboxes after this code still with no values inside. I am using some not java classes to display the piechart. The dataset is a class in this package which stores the values for the pie chart. The error i am getting has as follows.
    Validating PieChart2D
    Validating Chart2D
    Validating Object2D
    Validating Object2DProperties
    Object2DProperties was valid
    Object2D was valid
    Validating Chart2DProperties
    Chart2DProperties was valid
    LegendProperties is null
    Chart2D was invalid
    Validating PieChart2DProperties
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    PieChart2DProperties was valid
            at net.sourceforge.chart2d.Chart2D.updateChart2D(Chart2D.java:152)
    Dataset is null
            at net.sourceforge.chart2d.PieChart2D.getPreferredSize(PieChart2D.java:200)
    Validating MultiColorsProperties
            at java.awt.FlowLayout.preferredLayoutSize(FlowLayout.java:368)
    MultiColorsProperties was valid
            at java.awt.Container.preferredSize(Container.java:1558)
    Possibly unable to check for all invalidities because of early invalidity
            at java.awt.Container.getPreferredSize(Container.java:1543)
    PieChart2D was invalidEverything that is valid is in the class the button points to the other and the invalid in the ones i am trying to enter.
    Could someone please show me how to do it...? I need to get the values from the checkbox to the button...well that is what i think...
    I post the same thing the event handling forum but i didnt get any replay and i thought of trying this one as well...

    Post a small demo code that is generally compilable, runnable and could reproduce your problem. See: http://homepage1.nifty.com/algafield/sscce.html.

  • How to take the back up of  MPOS and planning area

    Hi Gurus ,
    i am using apo dp version 5.0 .We are trying to adding a new key kigfigures in our planning object structure and planning area .
    so,we are trying  take a back up of our Planning objects structure and planning Area .
    1.How to take the back up of MPOS and Planning area  ?
    2. How loading back the data in to the same MPOS and Planning area after adding some keyfigures to MPOS and planning area.?
    I gone  thru the www.help.sap.com but i did not understand properly .
    I would really appreciate if somebody clearly eleborate  the procedural steps .
    Thanks!
    Kriss.

    Hi Kriss,
      First let me clear you some points.
    1. MPOS always contain characteristcis only not the key figures.
    2. Planning area always contain Key figures.
    3. When you create planning area at that you have to assign MPOS & Storage bucket Profile. So Automatcially Characteristcis, Key figures & Time charcteristics realetion mentained.
    Come to your point.
    1. Before creating data source which is depend up on Planning area, you should sure that your basic structure get finalized say, MPOS, Planning area & rest configuration setting. So if you think there will be some extra key figure required after finalizing planning area then in that case you can creat some extra key figure & adding to planning area before finalizing it. So that you can use these key figure in future also.
        What ever data you want to extract from planning area you required whole data extraction process. So whenever you create data source depend up on planning area then automatcially all the info Objects( Char. key figures, time char. ) come in to data source by default. So further you have to replicate it in to APO BW & create rest data extraction process depneds up on data source. So automatcially all the info objects come in to an Info Cube & your extraction process will wrk fine.
    2. Relignment can effect on data transfer from Info Cube to Planning area becz previously your charcteristcis values are different & you had taken back with those characteristcis values, now if you did relignment then charcteristcis values are suppose to be changed, so while loading data from Info cube to Planning area your charcteristcis values will not match & data will not load for those char. values only.
        See, Data always stored in to planning area ( Live cache) against characteristcis, Key figures & time characteristcis. Data is not stored in to MPOS.
    Hope this will help you
    Regards
    Sujay

  • How much is the value of minimum delay of PCI-6024E?

    Hello:
    I use PCI-6024E board to do some work.when I use function "scan_op" of multichannels sample,I find I can't get a value in the help files.One of parameters of function "scan_op"---"scanRate" is so described:"When scanRate is not 0, scanRate must allow a minimum delay between the last channel of the scan and the first channel of the next scan." I want to ask how much is the value of minimum delay of PCI-6024E?If you know,please tell me,thanks.

    Hello;
    For E Series devices, this delay corresponds to the speed of the board. So, for the 6024E case, as the maximum Sample Rate is 200kS/s, that means that the minimun delay will be 1/200k = 5u seconds.
    Hope this helps.
    Filipe
    Applications Engineer
    National Instruments

  • How to get the values from popup window to mainwindow

    HI all,
       I want to get the details from popup window.
          i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
       now i am able to display popup window with values.How to get the values from popup window now.
       I can anybody explain me clearly.
    Thanks&Regards
    kranthi

    Hi Kranthi,
    Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
    Regards,
    Uday

  • How to get the value from a JavaScript and send the same to Java file?

    Hi.
    How to get the value from a JavaScript (this JS is called when an action invoked) and send the value from the JS to a Java file?
    Thanks and regards,
    Leslie V

    Yes, I am trying with web application.
    In the below code, a variable 'message' carries the needed info. I would like to send this 'message' variable with the 'request'.
    How to send this 'message' with and to the 'request'?
    Thanks for the help :-)
    The actual JS code is:
    function productdeselection()
    var i=0;
    var j=0;
    var deselectedproduct = new Array(5);
    var message = "Are you sure to delete Product ";
    mvi=document.forms[0].MVI;
    mei=document.forms[0].MEI;
    lpi=document.forms[0].LPI;
    if(null != mvi)
    ++i;
    if(null != mei )
    ++i;
    if(null != lpi)
    ++i;
    if(null != mvi && mvi.checked)
    deselectedproduct[++j]="MVI?";
    if(null != mei && mei.checked)
    deselectedproduct[++j]="GAP?";
    if(null != lpi && lpi.checked)
    deselectedproduct[++j]="LPI?";
    if( 0!=j)
    if(i!=j)
    for (x=0; x<deselectedproduct.length; x++)
    if(null != deselectedproduct[x])
    message =message+ "-" +deselectedproduct[x];
    alert(message);
    else
    //alert(" You cannot remove all products!");
    return false;
    return true;
    }

Maybe you are looking for