How to get to 01:00 using SimpleDateFormat?

Hello

I want to format 3 600 000 to 01:00, but always had a 06:00?

What should I do to get in shape 3 600 000 at 01:00.

my code:

_formator = new SimpleDateFormat("HH:mm:ss");

_formatedTime = (millisecond == 0)? 'Off': _formator.format (_countDate);

I wonder still there is a better way, but now I have to do the following:

  private String formatTime(long microseconds)
    {
        String res = null;
        long seconds = microseconds/1000000;

        // get second digit
        long s = seconds % 60;

        // get minute digit
        long m = seconds/60 % 60;

        // get hour digit
        long h = seconds/3600 % 60;

        // add "0" before single digit number
        res = (h < 10 ? ("0" + h) : ("" + h))
            + ":" + (m < 10 ? ("0" + m) : ("" + m))
            + ":" + (s < 10 ? ("0" + s) : ("" + s));

        return res;
    }

Tags: BlackBerry Developers

Similar Questions

  • How to get distinct records by using the ListAgg OBIEE report function?

    Hi all

    I get a correct result as mentioned below. But I don't see duplicates in my result here, in my example, I get duplicate for the name of the employee 'Pat '. So how to get Distinct values by using the LISTAGG function?

    Data set of sample with the Department and its employees

    Service employee

    ----------      ----------

    Marketing Michael

    Pat of marketing

    Pat of marketing

    Pat of marketing

    Purchase of Den

    Purchase of Alexander

    Purchase of Shelli

    Purchase of Sigal

    Guy of purchase

    Purchase of Karen

    Using the ListAgg function, we can convert it to:

    Employees of the Department

    -----------     -------------------------------------

    Marketing of Pat, Pat, Pat, Michael

    Purchase of Sigal, Shelli, Karen, Guy, Den, Alexander

    I tried a lot of things, but I'm not able to understand how exactly this can be achieved, if anyone has any idea or suggestions please do share, thanks in advance.

    After much research, I found the solution & I want to share what he finds very useful, we can create SQL logic in the Advanced tab, as below and after you click Rescan, and then you will get your desired results.

    SELECT saw_0, Evaluate_Aggr T1.dept ("ListAgg(%1,'' & '') intra group (about 1%)") ("as long as VarChar (1000), T1.emp) saw_1 FROM)

    SELECT 'emp_dept '. "the Department dept,

    'emp_dept '. "' employee ' emp

    IN THE "DOMAIN".

    GROUP BY dept, emp

    ) T1 GROUP FROM T1.dept ORDER BY saw_0

    Also note here that we have good anti-aliasing for columns parent (ex: saw_0, saw_1), another by mistake oracle bi server.

  • Got a legal question about the installation of Adobe Photoshop Elements.  How to get help from Adobe using a chat session?

    Got a legal question about the installation of Adobe Photoshop Elements.  How to get help from Adobe using a chat session?

    AdobeTomFaith

    If your program is Photoshop Elements, then you have posted in the wrong forum. Some how your son got posted in the Forum Adobe Premiere elements (video editing). Please re-post your thread in the Adobe Photoshop elements Forum.

    Photoshop Elements

    Wherever your son is, please include Adobe Photoshop Elements version and operating system and the description of the installation problem (error messages, stage of failure, etc.)

    Support Adobe seems to be limited to Adobe cat and is classically limited to the current version which is 13. Then, you the best avenue to success is likely to be through the Adobe Photoshop elements Forum. But that shouldn't stop you trying to determine what kind of support you can get from Adobe cat on your question.

    I would offer this link that is specific for Adobe Chat download and installation

    Contact the customer service (this is not the same destination as shown in a previous post in your thread)

    This link is specifically designed for

    Photoshop Elements

    Download, installation, setting up

    Download and installation

    Panel discussion

    (18:00 - Friday 7 pm Sunday)

    Thank you.

    RTA

  • How to get sqlplus not to use the output of size documents fixed?

    I want to generate the sql code to clear all data in tables in the database of flat files, one file per table, one row per record.  I thought I'd try to use the ascii code for characters inherited 31 as a delimiter to separate the fields and start sqlplus. But a problem is how do you get to specify linesize? Are there not a way to get out of creating fixed size records in sqlplus? I would prefer each line to just be so great that it must be rather than set the linesize being the absolute maximum. (32767) or understand what the maximum size is on a per-table basis.

    Is it possible to do?

    What I've tried so far (so I would have executed him each resulting sort script d30_x.) OK but how to get rid of this thing linesize?

    / * create dump file using US 31 to separate the fields * /.

    wrap off Set

    Set linesize

    Set feedback off

    set pagesize 0

    set verify off

    UNDEF tab;

    set myfile = d30_ & & tab... SQL;

    is prompt myfile and myfile;

    coil & myfile

    Guest set linesize 2500

    Guest set pagesize 0

    Guest departed wrap

    quick game check out

    Quick spool & tab... LST

    Select guest of

    Select lower (column_name) |' | Chr (31)

    ||'
    of user_tab_columns
    where table_name = upper ('& tab') and
    column_id! = (select max (column_id) in the user_tab_columns where)
    table_name = upper ('& tab'))
    order of column_id
    /
    Select lower (column_name)
    of user_tab_columns
    where table_name = upper ('& tab') and
    column_id = (select max (column_id) in the user_tab_columns where)
    table_name = upper ('& tab'))
    order of column_id
    /
    from guest & tab
    Guest /.

    prompt off spool
    spool off

    Wait, I think it works!  Tell him to use the maximum linesize, then

    tell him to get rid of these spaces.

    OOPS I forgot something. A problem with this is that if there are embedded newlines \r \n one of those or both in a field, then this format that uses the newline to indicate the end of the recording is toast. And I know that they are inclined to do this. (Users can not live with them, can't live without 'em). More on that later.

    / * create dump file using US 31 to separate the fields * /.
    wrap off Set
    Set feedback off

    set linesize 150
    set pagesize 0
    set verify off

    UNDEF tab;

    set myfile = d30_ & tab... SQL;
    prompt myfile is &myfile;

    coil & myfile
    Guest set pagesize 0
    Guest departed wrap
    quick game check out
    prompt value trimspool on
    Guest trimout value on
    Guest set linesize 32767
    fast coil & tab... LST

    Select guest of
    Select lower (column_name) |' | Chr (31) | »
    of user_tab_columns
    where table_name = upper ('& tab') and
    column_id! = (select max (column_id) in the user_tab_columns where)
    table_name = upper ('& tab'))
    order of column_id
    /
    Select lower (column_name)
    of user_tab_columns
    where table_name = upper ('& tab') and
    column_id = (select max (column_id) in the user_tab_columns where)
    table_name = upper ('& tab'))
    order of column_id
    /
    Guest of & tab
    Guest /.

    prompt off spool
    spool off

    Post edited by: Lake

  • How to get the full DDL using SQL developer

    Hi all

    I need get the full DDL a table with the details of the index partitions, synonyms, comments (if any) and give information if given any role, use SQL developer. We can achieve the same thing using shortcut F4 on name of the table into a frog, then selecting tab DDL. Is it possible to get the same in SQL Developer also?


    Also how I see existing procedures using SQL developer?  A toad, we were able to achieve using the schema browser.

    Hi all

    I reached by - right click on connection - diagram open... and any browser will even...

  • How to get version vcloud director using Powercli 5.1

    Hello

    After how can connection to vCD (using Connect-CIServer), I get the vcloud director (for example 5.1.1 or 1.5.0) version? Thank you.

    Global $: DefaultCIServers | Select name, version

  • How to get host ESX PowerCLI using network details (IP address)?

    Hello

    I'm using script below to get (generation Version, ESX host name, name of the Cluster, datacenter, IPaddress (Service & Vmkernel console))

    -


    SE connect-VIServer *-user *-password *.

    Get-vmhost (Hostname). Select name, Version, Build,

    @{N = "Cluster-Name"; E={@(($_ | {{(Get-cluster))}}.

    @{N = 'Center'; {E = {Get-Datacenter - VMhost $_}},

    @{N = 'Service Console'; E={@(($_ | {{(Get-vmhostnetworkadapter))}}

    -


    Output as follows:

    -


    Name               : *******

    Version: version 3.5.0

    Build: 207095

    The cluster name:

    Data Center: *.

    Service-Console: {vmnic1, vmnic0, vmnic6, vmnic7...}

    -


    Can some please help me how to change above script to include the IP address of the Console of Service & VMkernel... Thanks in advance...

    You can extend your script with the IP addresses of the VMKernel and Service Console like this:

    Get-vmhost (Hostname) | Select Name, Version, Build,
    @{N="Cluster-Name";E={@(($_ | Get-cluster))}},
    @{N="Datacenter";E={Get-Datacenter -VMhost $_}},
    @{N="Service Console";E={@(($_ | Get-vmhostnetworkadapter | Where-Object {$_.PortGroupName -eq "Service Console"}).IP)}},
    @{N="VMKernel";E={@(($_ | Get-vmhostnetworkadapter | Where-Object {$_.PortGroupName -eq "VMKernel"}).IP)}}
    

    Best regards, Robert

  • How to get GMT or IST using the PL/SQL FUNCTION

    Hello, I use Oracle 10 G database (operating system: Windows-32 or 64 Windows).
    How can I get the date and time GMT or International without mentioning SYSDATE / DBDATE.
    Real problem the DB Sever time is frequently manipulated by the end user and I would like to connect the actual date and time of the transaction in other audit tables.

    Kind regards

    Tarun

    It won't increase your load on the server, you would simply have many waiting http events and the performance of your application depends on your internet connection to customers. Something not very desirable if you ask me and certainly will cause you headaches. Really bad headaches, and one day someone will ask who came up with the brilliant idea to get the timestamp system via http instead of... + sysdate + (I smell a future article http://thedailywtf.com/).

    In any case; That is: the http based sysdate function. I use mod_plsql to my 'webservice' running on a server where I'm sure the date is correct. You can use what you want, for a 'real' webservice implementation will be a little different. Google should know the answer about calling Web services from the data base.

    $[CHE_TEST@asterix1_impl] create or replace procedure server_time as
      2  begin
      3  htp.print(to_char(sysdate, 'dd.mm.yyyy hh24:mi:ss'));
      4  end;
      5  /
    
    Procedure created.
    

    As you can see the procedure does nothing else then exit the sysdate from my database server in a specified date format. I then call the procedure mod_plsql via utl_http on another server:

    $[CHE_TEST@asterix2_al32utf8] create or replace function get_server_time return date is
      2  begin
      3    --default would be 60, this is clearly too much
      4    utl_http.set_transfer_timeout(1);
      5    return to_date(utl_http.request('http://ias4/asterix1_impl_cronet/server_time'), 'dd.mm.yyyy hh24:mi:ss');
      6  exception
      7    when utl_http.REQUEST_FAILED then
      8      return sysdate;
      9  end;
     10
     11  /
    
    Function created.
    

    Now get_server_time will give me the time of my first database server (unless the requested HTTP fails for any reason, then it'll be sysdate)

    $[CHE_TEST@asterix2_al32utf8] select get_server_time from dual;
    
    GET_SERVER_TIME
    -------------------
    24.07.2012 13:35:00
    

    Again, if you go in this way use the feature carefully and not at each end of your application as it will give you performance problems .

    see you soon

  • How to get the public key using modulus and exponent

    Dear Sir
    I modulo and exp of the public key, how can I combine the GE the full public key, in the host application. These values are coming from the java card?
    I get these as follows:
                      rAPDU = channel.transmit(new CommandAPDU(getPublicKeyModCommand));
                      if (rAPDU.getSW() != 0x9000)
                      {  
                           System.out.println("Could not get the modulus");
                      }
                      if (rAPDU.getSW() == 0x9000)
                      {  
                           modulus = new BigInteger(rAPDU.getData());
                           arrayPrint(rAPDU.getData());
                      } 
                      
                      rAPDU = channel.transmit(new CommandAPDU(getPublicKeyExpCommand));
                      if (rAPDU.getSW() != 0x9000)
                      {  
                           System.out.println("Could not get exp");
                      }
                      System.out.println();
                      if (rAPDU.getSW() == 0x9000)
                      {
                           exponent = new BigInteger(rAPDU.getData());
                           arrayPrint(rAPDU.getData());
                      } 

    EJP wrote:

    In fact, I was using a deprecated function where the problem arose.

    N ° with the help of an obsolete method does not cause this problem. In fact:

    The stack trace is from this line:

    X509Certificate userCert = createClientCert( user_PublicKey, CA_PrivateKey, CA_PublicKey );
    

    The code for this method has not been demonstrated, so he's probably trying to use BC. The factory key code must have worked very well to get to this day.

    See you soon,.
    Shane

  • Re: How to get Corel WinDVD without using the recovery disk?

    The update for Corel WinDVD was rather messy and because of this some owners laptop uninstalled to try to install the new software. Now, we ended up with the only possibility of an image recovery, which, in practice, means losing the software.

    Updates for the Bluetooth and wifi are also pretty messy.
    Is isn´t possible to get this software back without using the recovery disk?

    As you probably know recovery image installed on Toshiba laptops is a kind of software that includes the operating system, drivers, tools specific to Toshiba and utilities but also some additional software like antivirus or DVD player application.

    All drivers and Toshiba tools and utilities are available on the Toshiba download page, and if you want to install the version of the OS, you can download each of them.
    This additional software is not available for download. It's a kind of gift on the owner of the laptop because as the new owner, your machine must be ready to employment with full protection and opportunities to use multimedia content.

    If you don't like it, you can remove the system and use your own applications.

    Summary: this software cannot be downloaded separately and if you want to have it again, you must install original image of recovery designed for your machine.

    If you have any other questions do not hesitate to ask.

  • Re: Satellite C50D-A-11 q - how to get key WIn8 and use it on the new HARD drive?

    Hello

    hard drive died in my laptop. How do I get my key Windows 8 so I can install the new hard drive?

    Thanks in advance

    Stuart
    nessydoo

    Unable to get the key separated from Toshiba, but only the Toshiba recovery disc.

    If you have not created the Toshiba recovery disc in the past, then you will need to order this disc from here: http://backupmedia.toshiba.eu/landing.aspx

    The disc contains the image. Image is a package that contains the (already activated) Windows system and all Toshiba drivers and tools.

  • How to get the Blackberry ID using javascript for Webworks App?

    Hi all

    I have developed a web application using Blackberry webworks SDK and emulator Ripple... Here, I need to get the Blackberry device ID using javascript... Please me... Thanks in advance...

    With respect,

    Marimuthu_P

    HM... There is a sample to get the PIN with javascript.

    https://developer.BlackBerry.com/HTML5/APIs/BlackBerry.identity.html#.UUID

  • How to get all values when using IN paragraph?

    Hi all

    create the table test_case

    as

    Select ' AB-101' ord_no, to_date('06/17/2015','mm/dd/yyyy') dr_date, dr_type 'AB', 'ABC' double dr_name.

    Union of all the

    Select ' AB-100', to_date (' 17/04/2015 ',' mm/dd/yyyy'), 'AB', ' ABC' of the double

    Union of all the

    Select '124', to_date (' 06 / 07/2015 ', ' dd/mm/yyyy'), 'BB', 'BBA' from dual

    Union of all the

    Select '123', to_date (' 06 / 07/2015 ', ' dd/mm/yyyy'), 'BB', 'BBA' from dual

    Union of all the

    Select '145', to_date (' 06 / 07/2015 ', ' dd/mm/yyyy'), 'CC', "CCA" to double

    Union of all the

    Select '144', to_date (' 06 / 07/2015 ', ' dd/mm/yyyy'), 'CC', "CCA" to double

    Getting output

    AB-10117/06/2015ABABC
    AB-10017/04/2015ABABC
    12406/07/2015BBBBA
    12306/07/2015BBBBA
    14506/07/2015CCCOMMON COUNTRY ASSESSMENT
    14406/07/2015CCCOMMON COUNTRY ASSESSMENT

    Expected O/p

    Select max (ord_no), max (dr_date), max (dr_type), max (dr_name) of

    where test_case

    and dr_type in('AB','BB','CC')

    I have to use dr_type in ('AB', 'BB', 'CC')

    AB-10117/06/2015ABABC
    12406/07/2015BBBBA
    14506/07/2015CCCOMMON COUNTRY ASSESSMENT

    Are there opportunities to use CASE?

    Hello

    Rajesh123 wrote:

    Hi all

    create the table test_case

    as

    Select ' AB-101' ord_no, to_date('06/17/2015','mm/dd/yyyy') dr_date, dr_type 'AB', 'ABC' double dr_name.

    Union of all the

    Select ' AB-100', to_date (' 17/04/2015 ',' mm/dd/yyyy'), 'AB', ' ABC' of the double

    Union of all the

    Select '124', to_date (' 06 / 07/2015 ', ' dd/mm/yyyy'), 'BB', 'BBA' from dual

    Union of all the

    Select '123', to_date (' 06 / 07/2015 ', ' dd/mm/yyyy'), 'BB', 'BBA' from dual

    Union of all the

    Select '145', to_date (' 06 / 07/2015 ', ' dd/mm/yyyy'), 'CC', "CCA" to double

    Union of all the

    Select '144', to_date (' 06 / 07/2015 ', ' dd/mm/yyyy'), 'CC', "CCA" to double

    Getting output

    AB-101 17/06/2015 AB ABC
    AB-100 17/04/2015 AB ABC
    124 06/07/2015 BB BBA
    123 06/07/2015 BB BBA
    145 06/07/2015 CC COMMON COUNTRY ASSESSMENT
    144 06/07/2015 CC COMMON COUNTRY ASSESSMENT

    Expected O/p

    Select max (ord_no), max (dr_date), max (dr_type), max (dr_name) of

    where test_case

    and dr_type in('AB','BB','CC')

    I have to use dr_type in ('AB', 'BB', 'CC')

    AB-101 17/06/2015 AB ABC
    124 06/07/2015 BB BBA
    145 06/07/2015 CC COMMON COUNTRY ASSESSMENT

    Are there opportunities to use CASE?

    If you want a separate line of output for each distinct value of dr_type, then use GROUP BY dr_type.

    For example:

    SELECT MAX (ord_no) AS max_ord_no

    MAX (dr_date) AS max_dr_date

    , dr_type - no need to MAX here

    MAX (dr_name) AS max_dr_name

    FROM test_case

    WHERE dr_type IN ('AB', 'BB', 'CC')

    GROUP BY dr_type

    ;

  • Created a form of the ADF since a human task - how to get other human tasks use the same form ADF?

    We are new on the forms of the ADF and we have a simple workflow with a few different human tasks.

    The task of the initiator, I right click it and automatically generated a form of the ADF.

    The rest of the human tasks have the same payload, and I want just the other human tasks use the same ADF form I've already created. How can I do this?

    Thank you.

    Yes, there is a way to reuse the shape of the ADF and its workflow for several human tasks as long as the payload is the same.  To do this:

    1. Open the file "hwtaskflow.xml" inside your project of the ADF.  It will be difficult to read when you first open it so right mouse click the xml file-> select "reformat".
    2. Copy the 6 lines with the element with the form that you want to reuse-> pick up the 6 lines in the file under the rows that you copied.  The and elements in the text that was copied just need to be changed from the old human task name (for example, ".../MyHumanTaskOriginal") on behalf of the human recycled news of the task (for example, ".../MyHumanTaskReused").  Don't forget to leave the text in the and items of value to their original name.
    3. Redeploy the project.

    Dan

  • How to get out of scheduled using web service api report

    Hello

    By using the api service report I can run the report query and get the result and save it in a file. But as I'm under the report directly I don't see report running history in BIP UI. (Or there is a way to do what I don't know.)

    So I create a task report and the request for a change it and then call using the api planning service and it works properly gives me a return identification work and I see the history for a job at the BIP UI.

    But I can't find a api that gives me the result of this work.

    All of the suggestions.

    I use eclipse, cfx to generate stubs, and it's a simple java program with access to the web service

    Obtained, he works as below.

    1. Call scheduleReport on SchedulerService to schedule a report and get the scheduled_job_id.
    2. Call getAllScheduledReportHistory on SchedulerService using scheduled_job_id to get the work history that includes the work of the child created by the Scheduler for above child_job_id scheduled_job_id.
    3. Call getScheduledJobInfo on SchedulerService using child_job_id to check whether the job has finished if it is wait for a while, then try again until the work is either successful or failed. The api returns object JobDetails
    4. If the job is successful then check if xmlDataIsAviable for the above job details. If Yes, then call getXMLData on SchedulerService using child_job_id which gives a byte array, write this array of bytes on the disk using the java.io library
    5. Call getScheduledReportOutputInfo on SchedulerService using child_job_id for the information of reportOutput, which is a list of cases
      more than one output format is specified in the report definition to the bi pub. Scan the list for the output_id for the data to the desired output format.
    6. Call getDocumentData on SchedulerService using the output_id above, which gives an array of bytes of report data, and save it using the java.io library

    If you want to avoid voting in step 3 you can configure a httpserver in bi publiher, which is basically a servlet url of a Web application deployed on a server

    Select Server Name URL Default Delete
    BiPubReportsWebApp http://hostname:PortName/webappnameWebApp/servleturi

    and when planning the report in step 1, you can specify these options in the ScheduleRequest element

    scheduleRequest.setNotificationServer (notificationHttpServerName) / /notificationHttpServerName = BiPubReportsWebApp

    scheduleRequest.setNotifyHttpWhenFailed (true);

    scheduleRequest.setNotifyHttpWhenSkipped (true);

    scheduleRequest.setNotifyHttpWhenSuccess (true);

    scheduleRequest.setNotifyHttpWhenWarning (true);

    So when the work is done bi publisher will make a post to you request httpservlet with jobid, reporturl, jobstatus, so you can use this jobid (which corresponds to the id of child labour) to perform steps 4 and following

    Another thing to note is step 6 gives the byte array return which may be huge in big reports and you can go outofmemeory in this case

    (1) request to the server to save the xml data and output on the server and returns the path where these files have been saved by using downloadXMLData and downloadDocumentData to the SchedulerService, and then tokensize the string to get the last piece

    (2) call downloadReportDataChunk of the report (in a loop) service to get the data for the xml data and the document into segments giving him the name of the file in step 1, a start index and chunksize

    While (offset! = - 1) {}

    LOG.debug ("Getting chunck number :->" + counter + "index :->" + beginIdx);

    ReportDataChunk reportDataChunk = getReportDataChunks (tmpFileNameOnServer, beginIdx, util.chunkSize);

    data = reportDataChunk.getReportDataChunk ();

    output. Write (Data);

    beginIdx = beginIdx + util.chunkSize;

    offset = reportDataChunk.getReportDataOffset ();

    counter ++;

    }

    public ReportDataChunk (String starts, int beginIdx, int size) getReportDataChunks survey com.oracle.xmlns.oxp.service.v2.reportservice.OperationFailedException_Exception,

    {com Oracle.xmlns.OXP.service.v2.ReportService.AccessDeniedException_Exception}

    ReportDataChunk reportDataChunk is getReportServicePort () .downloadReportDataChunk (starts, beginIdx, size, getUsername(), getPassword());.

    Return reportDataChunk;

    }

    Note: when you schedule a report using schedulereport pub bi api back you a job id but matching so that it creates a Collard work with a different id that does the job and this childjobid is given when using the method of notification httpserver.

Maybe you are looking for