Need help on converting milliseconds to string.

Hi,
I am really confused by GMT. I need to convert milliseconds to string. A millisecond represents the date of 2/14/02 22:37:27 GMT. I formatted the string so that output is in the right format. But I kept getting a time string of "02/14/02 16:37:27". How do I get a string of "02/14/02 22:37:27" instead? My local time zone is GMT-6.
Thank you very much.

Is it a Calendar object you are using? If so it look slike there is a method called setTimeZone(). Its clear by your output that you are getting a local time for your zone so you just need to change the zone for that particular Calendar object (I think I never tried it)

Similar Messages

  • I need help in converting a pdf to a fillable form in my adobe

    I need help in converting a pdf to a fillable form in my adobe

    "Adobe" is a company. If you mean "Adobe Reader" then you can't (at least not easily). You need Adobe Acrobat for that.

  • Need help in converting numbers to Italian text

    Need help in converting numbers to text in Italian language. I want to knw is there any method other than SE63 to translate these text in one shot. I have tried with LSMW also (as the sheet is in XLS format ).Plz reply if anyone is aware of this ..

    hi,
    chk this code.
    CALL FUNCTION 'SPELL_AMOUNT'
    EXPORTING
    amount = amount
    currency = 'EUR'
    filler = ' '
    language = 'E'  => give the language as italian
    IMPORTING
    in_words = amountrs.
    rgds
    anver
    pls mark all hlpful answers

  • Need help in converting date format

    Hi,
    Need help in converting date format from 'DD-MON-YYYY' to 'YYYY-MM-DD' in an .rtf template as I believe xml publisher supports the date format as 'YYYY-MM-DD' only.
    Thanks,
    Raj.

    I got the same problem, anyone know how to solve this problem? I allready found some date functions on http://blogs.oracle.com/xmlpublisher/2008/09/date_functions.html . I also tried <?xdoxslt:month_name(xdoxslt:get_month(xdofx:substr(NEED_BY_DATE, 4,3)), $_XDOLOCALE), 0, 'nl-NL')?>, but then it returns a namespace error (Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'xdofx' used but not declared.). Anyone know how to fix this?
    Edited by: user11165753 on 7-dec-2009 23:50

  • I need help to convert a string to date and time

    Good aft,
    1.How can i get a date from the user input thro' Frames?
    2.How to parse it to the date object(I need to include java.util.Date but for the database i need to include java.sql.*,if i do so, i have error as
    found:java.util.Date
    Required:java.sql.Date)
    3.How to insert into the database
    The same i need help to insert time into database?
    I need solution and explanation...
    Reply me immediately...
    If u send me the code, its better to me.

    Hello,
    The best way is to use the HEX to decimal coversion VI in the string pallette. Then, write this decimal directly to your chart. If you are doing it a point at a time put it into a while loop.
    Doug

  • Need help to convert SQL MSSQL statement to work with PL in ORACLE

    Hi All,
    I have the trigger below and it worked on MSSQL server for windown and
    I really need your help to convert this trigger to work on PL/ORACLE:
    create trigger deleteLD
         on tablea for delete
    as
    set nocount on
    begin
         declare @tablename varchar(100)
         declare @dropSql varchar(50)
         select @tablename= dataset from deleted
         set @tablename = 'LD_' + @tablename
         set @tablename = @tablename + 'UTMSTATS'
         if exists (select * from sysobjects where name = @tablename)
         begin
              set @tablename = 'drop table ' + @tablename
              EXEC (@tablename)
         end
    end
    GO
    Your help is greatly appreciated.
    Thanks,
    JP

    not sure if this is something that you want:
    Create Or Replace Trigger deleteLD
      Before Delete on tablea
    Declare
      vCtr          number := 0;
    Begin
    select count(*)
       into vCtr
       from all_tables
      where table_name = :new.tablename;
    if vCtr > 0 then
       dbms_utility.exec_ddl_statement('drop table '||:new.table_name);
    end if;
    End;note: not tested

  • I need help to convert hours,minutes and seconds to seconds.

    Hi, I need help with the code on how to convert the hours,minutes and seconds to seconds. I don't know which formula to use so that I can get the results in total number of seconds. Thanks.

    Jos ("when in doubt: parenthesize correctly")Bracist.You're more right than you'd known: last week I climbed over a safety
    fence (which I wasn't supposed to do of course) to adjust the position
    of an optical measurement device we installed in a huge production
    machine in a factory. I stepped on some sort of hose; the end of that
    hose broke loose and hit me straight in the middle of my lower jaw. My
    front teeth feel wiggly now and my molars on the left of my lower jaw are
    not what they used to be. This Wednesday I get that all fixed at some
    dental clinic. Keep your fingers crossed because me+dentists == war.
    My tongue continuously keeps on reporting craters and disaster ;-)
    Jos, how's it going? Besides a possible loss of some teeth, I'm fine ;-)
    My Spring/Hibernate journey continues. I'm trying out Hibernate 3.2
    annotations and the Ant tools. So far, so good.Good to hear. At the moment I'm putting my teeth (sic) in that darn snmp
    stuff which simply refuses to work the way I want it and besides that I'm
    heavily involved in some of that SAP stuff. Spring is not in the vicinity for
    me in the next couple of months sadly enough.
    kind regards,
    Jos

  • I need help to convert photos in the .swf format to a format that will open on iOS

    I need help converting photos in the .swf format to a format that will work on my Mac.  Thanks

    SWF is a Flash file that should be able to be opened with your web browser on your Mac. Probably not on iOS though.
    You will likely need to find the source file for the application that created the SWF and the image will be in that. You could then export/extract the image and have it as a stand alone file.
    It does look like there are applications that can do what you are looking for though: https://www.google.com/search?q=SWF+to+JPG

  • Need help in converting DAQ to DAQmx

    Hi,
    I've struggled with coverting traditional DAQ to DAQmx for two weeks. I really need help from someone.
    As you can see the picture below, I've tried to replace the old VI's with new ones. But, it doesn't work. Of course, the VI below is just a part of my VI. VI's after case structure are inside of while loop.
    Could you please give me thought that why it doesn't work?
    FYI: The strange thing about it is that it runs without any error messege, but there is no actual output (values on the graph, data in arrays, etc).  
    Thanks in advance.
    Best,
    Jay
    Solved!
    Go to Solution.
    Attachments:
    Untitled 1.vi ‏74 KB

    Hi Jay,
    Assuming that the Traditional DAQ and DAQmx code are screenshots from separate VIs, I believe that the following parameter of the read functions in each driver would account for the different behavior that you are seeing (you have both set to -1):
    Traditional DAQ:
     DAQmx:
    So, when you give DAQmx Read a -1 for "number of samples per channel" when running a Continuous task, the effect is that it will return whatever data is available at the time DAQmx Read is called.  In your case this is immediately after the task is started so there very well could be 0 samples available in the buffer.  I'd imagine that you would see data if you change the value of this parameter from -1 to the actual number of samples that you want to read.
    Having said this, if you want to acquire continuously you should call DAQmx Read from inside a loop.  I agree with the others that you should take a look at the DAQmx shipping examples to help get started, you will probably find something very close to what you want to do.  You can find the examples at:
    Help >> Find Examples... >> Hardware Input and Output >> DAQmx
    Thanks for posting, I hope this helps!
    -John
    John Passiak

  • Loader (Need help to convert from AS3 to AS2)

    Since I know this code works fine and that I use it into one of my AS3 flash, I need it in one of my AS2 flash and I don't know how to adapt it. I've searched in over 100 threads and I can't find something similar... Thanks to help me get it to work in AS2! Since I need it in AS2, I thought it would be the right place to post it.
    I posted all the loading process code, but I would need help mostly with the Loader part. How to do it in AS2? Thanks!
    var img = 0;
    var image_total = 0;
    var myImages_array:Array = new Array();
    var myBitmaps_array:Array = new Array();
    function Init();
    // Images urls are loaded into an array before this call
    LoadImage();
    function LoadImage()
        if (img < myImages_array.length) // img is the current image index and myImages_array is my array of URLs
    // I need help with this part please
            var loader:Loader = new Loader();
    // returns the image full path and load it
            loader.load(new URLRequest(my_site_url + myImages_array[img]));
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
        else
            if (count == 0)
    // When everything's loaded, I'll start loading my Bitmaps into a small slideshow
                count += 1;
                init_slideshow();
    function imageLoaded(e:Event):void
        var image:Bitmap = e.target.content;
    // Bitmap manipulation here (removed)
        image_total = myBitmaps_array.push(image);
        if (img < myImages_array.length)
            img += 1;
    // Call next image
            LoadImage();
    function init_slideshow():void
    // Reserts the current index for the first one
        img = 0;
    // Start the slideshow since everything's loaded
        animate_slideshow();

    If you look at the Flash help documentation for the addListener metod of the MovieClipLoader class, there is an erxample there that you should hopefully be able to work from.  It will be better if you get your stuff coded into AS2 before you pursue more help with it.  IT is difficult to tell you how to fix something if you don't show what you are using.

  • Need help in converting string to numeric array

    I am trying to convert a string to a numeric array ... the first # in the string gets cut off, the last three seem to come through. 
    This may be fairly simple, but I really haven't worked with the string functions all that much.
    Help would be appreciated.
    Thanks,
    Attachments:
    String to Array Example.vi ‏10 KB

    Steve Chandler wrote:
    If you remove the first and last byte from the string using string subset then the read spreadsheet string would probably have worked.
    Yup.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    String to Array ExampleMOD2.vi ‏10 KB

  • Needed help regarding converting  string to java.sql.Date format

    I have a a function which returns a calendar object. The date must be inserted to Oracle DB using java.sql.Date format.
    So i have converted the Calendar object to java.sql.Date format using the following code
    java.sql.Date publicationDate = new java.sql.Date(book.getPublicationDate().getTime().getTime());But while getting inserted into the DB it was in mm/dd/yyyy format whereas i wanted dd/mm/yyyy format
    Can any body please help out how to store the date in dd/mm/yyyy format ?

    Can u please explain this a bit
    This is my code
    public int addBook(List<Book> BookList) throws SQLException, ParseException{
              System.out.println("Hi there");
              Book book = new Book();
              BookDB bookDb = new BookDB();
              //listLength =      BookList.length;
              String bookId = null;
                   try{
                        DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                        con  = DriverManager.getConnection("jdbc:oracle:thin:@10.123.79.195:1521:findb01","e115314", "e115314");
                        addBook = con.prepareStatement("insert into ABC_Book values(?,?,?,?,?,?,?)");
                        Iterator<Book> iterator = BookList.iterator();
                        while(iterator.hasNext()){
                             book = (Book)iterator.next();
                             System.out.println(book.getBookId());
                             addBook.setString(1,book.getBookId());
                             addBook.setString(2,book.getTitle());
                             addBook.setString(3,book.getAuthor());
                             addBook.setString(4,book.getPublisher());
                             System.out.println(book.getPublicationDate());
                             System.out.println("Before Date");
                             System.out.println("book.getPublicationDate().getTime()"+book.getPublicationDate().getTime());
                             java.sql.Date publicationDate = new java.sql.Date(book.getPublicationDate().getTime().getTime());
                             SimpleDateFormat formatter = new SimpleDateFormat("dd/mm/yyyy");
                             dateString = formatter.format(publicationDate);
                             System.out.println("Today is"+dateString);
                             java.sql.Date date = (java.sql.Date)formatter.parse(dateString);
                             System.out.println("date"+date);
                             //java.sql.Date publicationDate = (Date)book.getPublicationDate().getTime();
                             //System.out.println("Value of date is"+publicationDate);
                             System.out.println("After Date");
                             addBook.setDate(5,publicationDate);
                             addBook.setString(6,book.getCountry());
                             addBook.setString(7,book.getLanguage());
                             rs = addBook.executeQuery();
                             //con.commit();
                             rowCount = rowCount + rs.getRow();
                        return rowCount;
                   catch(SQLException se){
                        se.printStackTrace();
                   finally{
                        con.close();
                        System.out.println("After adding ");
              return 0;
         }

  • Need help to convert this format of string in a int value?

    public static int isNumber( String number, int defaultValue ) {
              int result;
              try {
                   result = Integer.parseInt(number);
              } catch( Exception e ) {
                   result = defaultValue;
              return result;
         }Hi, I have the above method that converts a string Number into a int value. It works fine if the string is a normal number 234 (without spaces) but I have a string in the following format:
    *(space)�23,000(space).*
    That is I have a "space" then a "Pound" sign then two numbers then a comma followed by three numbers and then a space again.
    Is there any way I can convert this format into a simple int value?
    Thanks for any guidance.
    Zub

    Hi, I tried the following code but it don't seem to work
         public static int isNumberTrimSpaces( String number, int defaultValue ) {
              number.trim();
              String parsed = "";
              for (int i = 0 ; i < number.length() && number.charAt(i) != ',' ; i++)
             if (Character.isDigit(number.charAt(i))) {
             parsed += number.charAt(i);}
              int result;
              try {
                   result = Integer.parseInt(number);
              } catch( Exception e ) {
                   result = defaultValue;
              return result;
         }Any Ideas? Also will the loop get rid of the pound sign?

  • Needing help with CONVERT(CHAR(11))

    I need to convert an output(l_line_body_note) to a string and limit the string to a length of 128 characters. I have tried using the Convert to string character and everything i can think of. All help would be greatly appreciated.
    l_line_body_Note := '<Notes>' ||'GIA Notice Event '||pc_log_rec.notice_id||': '|| pc_log_rec.pc_comments || '</Notes>';

    I need to convert an output(l_line_body_note) to a
    string and limit the string to a length of 128
    characters. I have tried using the Convert to string
    character and everything i can think of. All help
    would be greatly appreciated.
    l_line_body_Note := '<Notes>' ||'GIA Notice Event
    '||pc_log_rec.notice_id||': '||
    pc_log_rec.pc_comments || '</Notes>';I believe you are using PL/SQL appending. In jave you can use '+' instead of the '||'.
    String l_line_body_Note = "<Notes>"
    + "GIA Notice Event"
    + pc_log_rec.notice_id + ": "
    + pc_log_rec.pc_comments
    + "</Notes>";If you are actually after a PL/SQL answer then I suggest you don't post in a java forum.
    Ted.

  • Needs help on converting arabic word to english

    Hello every body,
    we have a requirement like ..some part of the strings in arabic we need to convert into english.Could u plz help me how to do.../if anybody have an example related to this requirement ..plz post a link.
    Thanks ,
    Anil.

    So, I wanted to add an addendum to this, after importing the file into Pages 09', I noticed I no longer had the ability to use the Section and Page break inserts. This is odd, and I believe I found out why. In Pages 5, that system of Sections and inserting blank pages works differently, with different templates. Once back into Pages 09', you simply have to create a blank page, and then use the "Capture page" option to make this your new Section insert/blank page insert, and then you have your formatting options restored.
    I'm currently fighting to get Table of Contents to format properly, as that function seems to have been banjaxed after the Pages 5 export into 09', so once I find a work around or a solution, I'll post that as well. Everything else seems to function as it had before, from slapping shapes in, to text boxes, tables, and page numbering. The Table of Contents works, but there isn't a label saying "Table of Contents" bolded, and the spacing and such for the listings aren't really... nice looking like they are normally.
    So, like I said, once I find out how, I'll post an update.

Maybe you are looking for

  • Interworking on Static Routing as IGP

    Was testing interworking between Vlan over ethernet and FR. As long as my LDP was on static routing, I couldnt reach end-to-end. The moment i configured OSPF as my routing protocol it came up. Can anyone let me know what the reason could be ?

  • Touch Screen Sticking on Z30

    My 24 day old Blackberry z30 is having a touch screen issue.  I have attempted to contact Blackberry Technical Support but since the phone was a gift, they will not assist me.  The problems include problems include: swipe feature sticking on lock scr

  • Condition supplement where used and usage of this function

    Dear all, I just want to know about condition supplement and where used of this functionality. Can anybody give me details regarding this. My requirement about this is for Manual condition type. This condition is manual header and item discount condi

  • SCDPM 2012 - backups are running dead slow

    SCDPM 2012 - backups are running dead slow. Below is the details of software and hardware. Server OS : WIndows Server 2008 R2 DPM version : SCDPM 2012 , Version : 4.0.1920.0 Server Hardware : Prolinet BL 460C G1 Tape drive - LTO 4 drives Network : HP

  • TS3899 I cannot send any emails through my phone.

    I cannot send mail thorugh my phone. Each time I do a screen displays saying ' username or password is incorrect. Go into settings and check.' i have done that and it is still not working. This is a new phone as my last one had problems that could no