How to read a time stamp from the db without ".0" at the end

Hi All,
I have code that is saving the results of a query in a result set.
When ever i read a time stamp from the db (mysql 4) it always adds ".0" to the end of it.
I tried using the getTimeStamp, getDate, getString methods for result sets and was not able to resolve the issue.
Am i missing something here?
Thanks

here is the code
public static Table executeSelect(Connection conn, String qry)
     throws SQLException {
          Statement stm = null;
          ResultSet rs = null;
          try {
               stm = conn.createStatement();
               rs = stm.executeQuery(qry);
               Table t = new Table(rs);
               return t;
          } finally {
               close(null,stm,rs);
Basically the user is asked to enter the query and the connection settings and then i retrieve the data and return a table.
Now if i try to print the value of the time stamp from the result set it adds a a .0
So for example if am running the following
select mod_ts from temp limit 1;
| mod_ts |
| 2007-12-28 09:32:58 |
1 row in set (0.00 sec)
When i print the value of the time stamp it gets printed as 2007-12-28 09:32:58.0
The following code is used to generate a table from the result set
public Table(ResultSet rs) throws SQLException {
          ResultSetMetaData rsmd = rs.getMetaData();
          int colCount = rsmd.getColumnCount();
          colNames = new String[colCount];
          colTypes = new int[colCount];
          for ( int i=0; i<colCount; i++) {
               String colName = rsmd.getColumnName(i+1);
               colNames[i] = colName;
               int colType = rsmd.getColumnType(i+1);
               colTypes[i] = colType;
          while ( rs.next()) {
               if ( data == null) {
                    data = new ArrayList<List>();
               List<Object> row = new ArrayList<Object>();
          for ( int i=0; i<colCount; i++) {
               Object ob = rs.getObject(colNames);
               row.add(ob);
          data.add(row);
Now when i print the values in the result set it adds a .0 to the end of the time stamp
I also tried using getTimeStamp for a result set and the same problem still existed

Similar Messages

  • How do I prevent my emails from being sent without my hitting the send key. Many of my emails are just "taking off" and sending while I am in the middle of typing. If this is a keyboard shortcut, I must disable it, so how do I do that

    How can I stop emails from being sent without my hitting the "send" key.

    Firefox doesn't do email, it's a web browser.
    If you are using Firefox to access your mail, you are using "web-mail". You need to seek support from your service provider or a forum for that service.
    If your problem is with Mozilla Thunderbird, see this forum for support.
    [http://www.mozillamessaging.com/en-US/support/] <br />
    or this one <br />
    [http://forums.mozillazine.org/viewforum.php?f=39]

  • How to read time stamps from a spreadshee​t and calculate the difference between consecutiv​e time stamps?

    Hi,
    I am new to Labview. This question might be a joke to some of you here, but any help would be greatly appreciated. I have a spreadsheet with time stamps and power outputs from a generator. I am supposed to calculate the difference between consecutive time stamps, which will act as a delay for the next power output update that needs to be sent. For example, lets say that I have to following data:
    Time Stamp                    Power Output
    11:00:00 AM                       3kW
    11:00:02 AM                       2.9kW
    11:00:04 AM                       3.2kW
    11:00:06 AM                       3.1kW
    The above data doesn't make any sense, but it is just for the purpose of this question.
    So, I have to read 11:00:00 AM and 3kW initially - 3kW is the initial request that

    Hello
    you can simple subtract one time from the other one and so you get the difference. -> Example
    Mike
    Attachments:
    Unbenannt 2.vi ‏8 KB

  • How to build a time stamp from a string

    I have the date-time information stored in a string and I want to build a time stamp to make a plot with the date-time in the X axys. Is there a way to do this??
    thanking in advance...
    crimolvic

    See attached vi.  You may have to modify depending on the order your string.
    - tbob
    Inventor of the WORM Global
    Attachments:
    DateTimeMOD[1].vi ‏34 KB

  • How do you edit out the date and time stamp from a photo

    How do you edit out the date and time stamp from a photo

    You can blur it out with retouch
    The built-in "Retouch" brush in "Edit" mode should suffice, if the background is mostly uniform, and if you set the size of the brush to slightly wider than the bar width of the letters. For example, in this picture I removed the year from the date (in the lower right corner) by using the "retouch" brush and following the contours of the letters. (the screen shot is from iPhoto '11, but iPhoto 9 should give similar results).
    Regards
    Léonie

  • How do I see the time stamp from footage

    I was wondering if it is possible to see time stamps from footage taken by GoPro camera in FCPX. I can see the duration of the clips and the DATE it was created. I would like to see the actual time it was created. I have 2 cameras that were shooting at the same time and I would like an easier way of sifting through all of the clips to mary them up.
    Is there a way to see the time stamp of when the video was taken?
    Thanks

    Got ya. I will suggest one more thing: You can add "markers" at points where you can visually (or aurally) see (or hear) a synch point. Once you add these markers, "synchronize clip" will begin to grind out the rest.
    Again, if you look at the above tutorial, I think it explains this under "manual" synch.
    I don't mean to push this upon you, but... FCPX is GREAT for multi-cam synch. It is the best--I think--in the industry.
    Good luck. Sorry if I'm of little help beyond this.

  • How do I delete a photo from my desktop which keeps showing the following info. every time I try to move it to the trash?:  "DSC_0073.JPG" can't be opened right now because it's being used by another task, such as moving or copying an item or emptying the

    I dragged a copy of a photo onto my desktop from iPhoto, and it seems to be in some state of process/activity (vs. just being a copy of a photo on my desktop).  I tried to delete/move to trash the photo, and I keep getting the following message:  “DSC_0073.JPG” can’t be opened right now because it’s being used by another task, such as moving or copying an item or emptying the Trash. Try again when the current task is complete.
    How do I delete this photo from my desktop?
    Thanks!

    I ended up shutting down my system, and when I started it back up, I was able to drag the photo to the trash and delete it (I did get a message warning that my deleting the photo might negatively affect the application that was "using" it, but I deleted it anyway...it worked...and I'm hoping I didn't adversely affect another application!).
    Thanks so much for your help!

  • Code for how to read an integer array from the command prompt...

    hello,
    Could anyone give me the code for how to read an integer array from the command prompt...its very urgent!..

    If you are using a recent version of Java (5 or later) you can use Scanner:
    http://java.sun.com/javase/6/docs/api/java/util/Scanner.html
    That page has some example code on it, too.

  • Transfer time stamp from text file into MS Access thru Labview

    Hello everyone,
    I am Cruz; Long time listener, First time caller.
    I am currently monotoring data being collected by an oven. The data is stored in a text file. I am using Labview to take the data from the textfile and place it in an MS access DB for manipulation. The first three columns of the text file are the time stamp of data. When i transfer the data into Access i cant get the first three columns to display as a time stamp. Can have some pointers on what how to get the first three columns to display correctly.
    Additional info:
    the text file is a 1D array that gets overitten with every new mesurement tanken. the transfer to Acces is to not loos any of the information and to better manipulate the data into forms and such.
    Running Labview 2010
    attached is code and text file.
    Any help is greatly appreciated.
    Attachments:
    Oven test other.vi ‏16 KB
    datalog032010003.txt ‏1 KB

    Your first mistake is reading the file as DBL. Your first three columns are obviously not numeric values. Did you ever look at the output array? Read it as strings. Second, you would need to combine those first three columns to create an actual time stamp before you write to the db. Unless of course you have one column for date, one column for time, and one column for AM/PM. I would not recomend that type of structure in the db.

  • How do I add time stamp to photo in photoshop?

    How do I add time stamp to photo in photoshop? I have saved photos from a camera phone to the computer. They still have the META data on them (aka the date and time from when the picture was taken). How do I put them on there?

    The following is old but may still be valid with Yosemite (it addresses how to remove the name but indirectly also how to display it): http://osxdaily.com/2012/01/10/remove-user-name-from-menu-bar-os-x/

  • Decode time stamp from c-code

    Hi everybody,
    I have a TCP/IP where I send datagrams (in c-code) to LabVIEW (which is the server).
    The datagram sends with every data a time stamp in the following way: dd.mm.yyyy hh:mm:ss.zzz, where zzz stands for milliseconds. I would like to see my data in a waveform chart at the LabVIEW frontpanel, but I'm not sure how to get a continuous time stamp from the c-code. I tried it with "scan from string" (as my data enters LabVIEW as a string), and then I made a sum of the minutes (times 60) and the seconds, which works for one minute, but after one minute my time goes of course to zero again which isn't nice for the waveform chart...
    Does anybody has a nice idea how to solve this? Any examples?
    Thanks in advance!
    Steffi

    This code should help you,
    I only have a problem to read the final '.' my localization set the ',' as decimal sign and I can't get LabVIEW to change the decimal sign in this parser.
    Ton
    Message Edited by TonP on 02-01-2008 10:00 AM
    Message Edited by TonP on 02-01-2008 10:01 AM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    ScanTime.png ‏2 KB

  • How can I delete an attachment from a received email but save the message?

    Hi all, how can I delete an attachment from a received email but save the message?*

    Over the years this issue crops up again and again. Here are the cases I know about:
    Case 1 - it simply doesn't work
    I have a message in my inbox with a jpeg of about 300Mb. Select message, choose option "remove attachment" which is not greyed out, and it does not work.
    Case 2 - it works if you save the message first
    I move the message from the inbox to a mail box. Open the mailbox (select), select the message, choose option "remove attachment", result: the attachment is removed, a small text file is added and an error appears in the message "missing plug-in". The message size is reduced from 300Mb to a few bytes.
    Case 3 - the option "remove attachment" is greyed out.
    I've googled this at least 10 times and read all the advice about editing various files from the library and all the other hacks. The simple truth here is that the user should not be inconvenienced by such inappropriate behaviour. We're not used to this from Apple any more, not since OS X. Even Windows does this stuff painlessly. In fact this kind of function is something that Outlook and Exchange do incredibly well. If they didn't the corporate world would have ground to a halt.
    My point: the remove attachment option should work all the time and should be redesigned. Right-click + save as + delete in the message would be a hundred times easier.

  • *.eml Time Stamp - Select File in Windows Explorer Changes the Modified Date

    The Windows Live Mail *.eml files time stamp is getting changed to the current date when the file is selected in the Windows Explorer! I save backup copies of important E-mails to folders on the Hard Drive and then synchronize them with the same folders on other LAN Hard Drives for backup archives. When these E-mail files are selected or opened from the Windows Explorer in the Windows 7 OPS the Modified Date Time Stamp is changed to the current date automatically! This action creates a real problem when doing later synchronizations of all of the folders! The date will not be the original date of the E-mail and the original file will be over copied with the file with the newest date stamp. I stopped Indexing on the *.eml files and that stopped the time stamp change when overcopy synchronization, but if the file is selected during a viewing in Windows Explorer then the Time Stamp is updated to the current date again! A solution to this problem would be greatly appreciated if anybody knows of one. Thanks - - - Shorto

    The Date and Timestamp changing issue in Windows 7 has a two part fix!
    1. Disable the Indexing of the *.eml file type in the Indexing Options located by Clicking on "Control Panel" -  "Indexing Options" - Advanced Button - File Types Tab - scroll down to the .eml file type and uncheck the Box then click OK to finish, so
    that the Email type of files won't be Indexed.
    2. Delete the Registry Entry listed below, be sure to Export and Save the original Key so it could be Restored if something goes wrong!  \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers
     and Delete the .eml entry
    That should fix the problem with the changing Date/Timestamp of Email Files. For more information read CarlS's WindowsSeven Fourm thread where I also have more input:
     http://www.sevenforums.com/browsers-mail/35334-eml-files-timestamps-updated-constantly.html
    This should give you a better understanding on the problem and the Fix. - - - Shorto

  • I am having trouble reading a time stamp on a video using OCR

    I am trying to read a time stamp that is overlaid on a video, using OCR software, but it will not read it correctly I've tried the OCR Preproccessing and Recognition Config VI's and neither have been able to correct to problem I would appreciate some help

    In my experience, it is very important that the contrast not only be
    very good but also that the characters can be easily distinguished
    from the background and that the characters are generally repeatable
    and unique. I've had problems with characters "smearing" into the
    background so that the OCR can't tell where the background ends and
    the character begins.
    Beyond the standard NI OCR stuff, you can use a database to map
    incorrect whole words to correct whole ones in OCR but this only works
    when there is a set of unique words that are significantly different
    from each other. It doesn't work on numbers since any number is
    generally as likely as any other.
    It may be worthwhile to invest in higher quality acquisition equipment
    to improve the image quality. If your video source itself is poor
    quality, then it won't matter though.
    Douglas De Clue
    [email protected]
    nestor wrote in message news:<[email protected]>...
    > Ernest,
    >
    > As "labviewguru" mentioned a screenshot will help a lot to determine
    > if the problem is the image quality. However if you can't post this
    > image then please review the following links I'm attaching here. They
    > talk about OCR and most important, about Filtering, which is mostly
    > used in Vision for image enhancement, noise reduction, sharpen an
    > image, etc. Please review the links mentioned below and apply some
    > filtering techniques to your image. This may help a lot, personally
    > I've used OCR software and I have required in most cases to apply
    > filtering before running the OCR functions.
    >
    >
    > href="http://zone.ni.com/devzone/conceptd.nsf/webmain/E69D110920B99E838625685E0081B881?opendocumen...
    >
    > href="http://zone.ni.com/devzone/devzone.nsf/webcategories/605B55C3100D02188625685E0076C928?opendo...
    >
    > href="http://zone.ni.com/devzone/devzone.nsf/webcategories/E28E087D201C1AD48625685E00824E3C?opendo...
    >
    > Here at the Developer Zone, inside the Development Library you will
    > find in the Vision chapter a lot of information that will be helpful
    > for your development. Please review it. In case you require further
    > assistance you can keep posting questions here at the Discussion Forum
    > or give us a call/email (www.ni.com/ask).
    >
    > Good luck!
    >
    > Nestor Sanchez
    > IMAQ/Motion Support
    > National Instruments

  • How do I remove a stamp from favorites?

    How do I remove a stamp from favorites? (Acrobat XI Standard)
    I testing the Stamps in the Comment portion of Acrobat and I fid that when I select one it ends up as a Favorite.
    If you have 2 or more you can remove 1 of them but if you only have 1 you can not remove it.
    Is there a problem with me - - or the software?

    It’s easy to remove the “Approved” stamp from the Favorites list on the Stamp pull-down menu in Acrobat.
    1) Go to: C\Program Files x86\Adobe\Acrobat10.0\Acrobat\plug_ins\Annotations\Stamps\ENU
    2) Copy the “StandardBusiness” PDF file.
    3) Paste the copy of the “StandardBusiness” PDFfile on your Desktop (this is a temporary location).
    4) Open the copy of the “StandardBusiness” PDF file from your Desktop.
    5) Delete Page 1 (the “Approved” stamp page).
    6) Save and close the copy of the“StandardBusiness” PDF file.
    7) Copy the “StandardBusiness” PDF file from your Desktop (the one you modified).
    8) Go to: C\Program Files x86\Adobe\Acrobat10.0\Acrobat\plug_ins\Annotations\Stamps\ENU
    9) DELETE the existing “StandardBusiness” PDF file from that folder.
    10) Paste the “StandardBusiness” PDF file you copied from your Desktop.
    11) Close Acrobat.
    12) Reopen Acrobat – the “Approved” stamp will begone from your Favorites list!
    13) By the way, the “Approved” stamp will, also, be gone.
    14) You can, then, DELETE the “StandardBusiness” PDF file from your Desktop.

Maybe you are looking for

  • Sync option isn't showing up in iTunes

    I'm trying to help my mother put music on her iPod Touch 2nd gen, but every time I connect the iPod to the laptop through USB, iTunes doesn't give me the option of syncing anything. The device does not showing up on iTunes at all. I have tried restor

  • How to view NEF (RAW) photos when in editing mode for PSE 9

    When I want to open a NEF photo to edit, all I cannot see the actual photo.  I have to go into another program to view the photos so that I can determine which file name I want to open and edit.

  • Can't locate my user apple loops ?

    who can help I made some apple loops and imported a few, there in my loop browser and playable but I can't find them on my hard drive and there is no user-loop file ??/

  • Why have iCal entries suddenly appeared in duplicate for every month?

    My iPhones and iPad are synced with my iMac via iCloud. All devices work perfectly except iCal on my iMac shows all entries in duplicate. Adding a new entry shows up as a duplicate in the iMac but as a single entry on all other devices (which is corr

  • Iphone 3G screen went white

    Yesterday I had my phone in my hand with clear picture and all of a sudden it went white. I can still receive calls, and I hear alerts from text messages. When I try to gain access to the screen the only picture I see is white. Does anybody know what