Date and time from array of string

I have managed to read information from an excel spreadsheet I am using and display different parts of it in indicators on my front panel. But the data being displayed for the cells that contain the date and time are showing up incorrectly.
The date of 15/08/2014 shows in the indicator box as 41866 and the time of 13:55:00 shows as 0.579861111111111
Is this something I need to change in the excel file or do I need to alter the data in the array before displaying it in the indicator.
Sorry if this has been explained in the past. I just cant seem to see a previous solution.
Thanks in advance

Hi n,
please search for your problem in the forum. This has been discussed a lot of times before! (keywords: Excel LabVIEW timestamps)
Excel stores timestamps as number of days (your 41866) and part of days (0.5798d = 13H55M). You need to convert those numbers using some (more or less) simple math to LabVIEW timestamps!
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • Readind Date and Time from a folder.Urgent help please

    Folks,
    I need some help regd reading of date and time from a folder.
    I have a folder which has 5 files.
    I need to read these files along with the date and time
    The date and time has to be in the format:
    mm/dd/yy and the time in 11:55
    I am attaching my code below,
    The f.lastModified() doesnt display the data in the current format
    Can some one please please help me to get the data in the format defined above
    private void readFoldert(){
       String folder = "/images/";
       File f1 = new File(folder);
       ArrayList al = new ArrayList();
        if(f1.isDirectory()){
         String s[] = f1.list();
          for(int i=0; i<s.length;i++){
             al.add(s[i] + f1.lastModified);                    
    } // End of if.
           

    Here's how to format a time. I hope you can figure out how to format a date:import java.text.*;
    import java.util.*;
    public class Test {
        public static void main (String[] parameters) {
            Calendar calendar = new GregorianCalendar ();
            calendar.setTimeInMillis (new java.io.File ("c:\\windows").lastModified ());
            System.out.println (DateFormat.getTimeInstance (DateFormat.MEDIUM).format (calendar.getTime ()));
    }Kind regards,
      Levi

  • How to load date and time from text file to oracle table through sqlloader

    hi friends
    i need you to show me what i miss to load date and time from text file to oracle table through sqlloader
    this is my data in this path (c:\external\my_data.txt)
    7369,SMITH,17-NOV-81,09:14:04,CLERK,20
    7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
    7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
    7566,JONES,02-APR-81,09:24:10,MANAGER,20
    7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30my table in database emp2
    create table emp2 (empno number,
                      ename varchar2(20),
                      hiredate date,
                      etime date,
                      ejob varchar2(20),
                      deptno number);the control file code in this path (c:\external\ctrl.ctl)
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>any help i greatly appreciated
    thanks
    Edited by: user10947262 on May 31, 2010 9:47 AM

    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)Try
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
    this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>
    That's not an error, you can see errors within log and bad files.

  • Is there a way to remove the date and time from pictures?

    Is there a way to remove the date and time from phoos in iPhoto?

    Are you referring to the Date and Time some cameras put right on the image?  If so there is nothing really good in iPhoto to do this. You could try the Retouch tool and see how that looks but I think you will need something more precise and powerful, like the clone tool in Aperture.
    Also something like PhotoShop or GIMP - The GNU Image Manipulation Program (free) should do what you want also.
    If your asking about some other date post back.
    regards

  • Get the date and time from iframe.

    Hi,
    Am using jdeveloper 11.1.1.6.0., I have used the following iframe source which gets the date and time.
    <af:form>
    <iframe src="http://free.timeanddate.com/clock/i3xb4nm0/n1722/tt0/tw0/ts1" frameborder="0" width="244" height="19">
          </iframe>
    </af:form>
    I need to get the date and time separately to perform some validation. How can i  get it.
    regards,
    Prasad K T,
    9840021070

    Prasad,
    I don't understand your use case. The url you use is a json web service which returns it's result as either xml or json payload. Why do you pretty print this as a web page and try to get to the result this way?
    Why don't you get the result directly using the json result or (AFAIK) the java script api which the service also provides.  Check the documentation of the service.
    From your description I understand that the user enters a time. You need to know if the time is before or after 2:30pm and have to set a 'shift' to A or B.
    Where do I need a timeservice in this validation?
    From what I see your approach won't work. As I still don't understand the use case I don't know how to help.
    Timo

  • How to prevent calendar from deleting dates and times from event names?

    Calendar automatically discards date and time information from titles of new events. For example, creating a new event with the text "Staff Meeting 9 a.m. board room" leaves only "Staff Meeting". Calendar discards the "9 a.m. board room" information without asking. This feature is not helpful to me. How do I disable it?

    >
    Apple Support Communities > Mac OS & System Software > OS X Mountain Lion > Discussions

  • Getting the date and time from NIST server

    I need to be able to get the date and time in an app and cannot trust the device's clock since the user could change it. Has anyone got an example of how to access an Internet time server such as the NIST servers from AIR for iOS?

    What is the best way to get the date and time?
    ThanksI am not sure that this is the best way. But one of the ways.
    <code>
    java.util.Date d = new java.util.Date();
    System.out.println("date is "+d.toString());
    </code>

  • How can I display the date and time from the playhead info as a subtitle ?

    Is there any way it is possible to display the video capture data and time during playback. I have seen some discussion on creating subtitles to do this, it would be nice if one could simply add a Title template with display fields for playhead information so that it automatically gets created during rendering.
    In case you are wondering why on earth anyone would want this, I would like to use this for display on multisport racing videos.
    Thanks

    There is a Date/Time title in the titles browser, does just what it says...

  • Integration with Outlook - how to increment end date and time from start date/time

    Hi,
    I want to add a variable amount of time to an appointment start date and time in outlook, through vba in access.  Code below shows what I've done:
    ======================================
        Dim olApp As New Outlook.Application
        Dim olAppointment As AppointmentItem
        Dim myRequiredAttendee As Outlook.Recipient
        Set olAppointment = olApp.CreateItem(olAppointmentItem)    
        With olAppointment
            .Start = DateValue(strStartDate) + TimeValue(strStartTime)
            .Duration = intDuration
            .End = DateValue(strStartDate) + ????????
    =======================================
    What do I replace the ????? with so that it increments the start time by any duration I decide in minutes?  Using the duration doesn't seem to work and I also want to be able to have the appointment span a number of days, e.g. could start at 930am on
    Monday and end at 10am on Weds, but want to set the end time relative to the start time.
    Thanks,
    Chris.
    _________________________________________________________ Every day is a school day!

    I've tried that, but it throws out a datatype mismatch error :(
    It would be helpful if you posted the exact code you tried.  In my tests, setting teh .Duration property appears to work.  However, if you want to set the .End property to a specific number of minutes after the date/time of the .Start property,
    this works for me:
    With olAppointment
    .start = DateValue(strStartDate) + TimeValue(strStartTime)
    .End = .start + TimeSerial(0, intDuration, 0)
    End With
    Assuming, that is, that intDuration contains the number of minutes the appointment should last.
    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

  • Can I remove the date and time from an image taken on my Powershot SX510 HS for printing?

    Natalie1, Once the photo is processed in the camera with the date stamp, it's permanent to the photo. The camera will not have that as a layer to turn off and on at will. It's much easier to add the date/time stamp to a shot for printing then it is to remove it. You will need some editing software such as Photoshop Elements, or Gimp (free), to remove the date/stamp. These software's can do a pretty reasonable job to remove any unwanted elements from the photo. Canon also has their Digital Photo Professional software that comes free with the camera, but it's not as easy to get the nice results of the Photoshop Elements. The change you make with these software's will remove the date/time stamp unless you only mask (layer) it. Steve M.

    Natalie1, Once the photo is processed in the camera with the date stamp, it's permanent to the photo. The camera will not have that as a layer to turn off and on at will. It's much easier to add the date/time stamp to a shot for printing then it is to remove it. You will need some editing software such as Photoshop Elements, or Gimp (free), to remove the date/stamp. These software's can do a pretty reasonable job to remove any unwanted elements from the photo. Canon also has their Digital Photo Professional software that comes free with the camera, but it's not as easy to get the nice results of the Photoshop Elements. The change you make with these software's will remove the date/time stamp unless you only mask (layer) it. Steve M.

  • Help! How to retrive the date and time from MySQL 'datetime' type

    In my MySQL database, I have stored a data type 'DATETIME' as 20070412093012 which is interpreted as 2007-04-12 09:30:12, How to using Java method to retrive it from data base???
    like resultSet.getDate('datetime')????or what is the method?

    Have a look at the API documentation for ResultSet. Which of the methods documented there do you think might be what you need? If you can't tell which is the right one, then post your candidates here and ask a question about them.

  • Filter on date and time from Live Office query panel (Excel)

    Hi,
         I'd like to know if someone already tried this.
    1- Create a univers with 3 fields.
    a. Field 1 type date: points to a type date field (ex: 2011-12-31 00:00:00)
    b. Field 2 type date: points to a type time field (ex: 17:00:00) -> which is basically 5pm
    c. Field 3 type date: points to a type datetime field (ex: 2011-12-31 17:00:00)
    2- Open Excel and using Live Office plugins
    3- Open the univers
    4- Drag the Field 3 as filters.
    5- Choose an operator ex: Between, Greater, etc.
    6- Open the calendar and select a date
    7- Modify the 00:00:00 to put something like 17:00:00
    8- Click away
    9- The time resets back to 00:00:00
    So my question is how do I have to setup the field in the univers so that we can query on the time using the univers in Live Office.  I say Live Office because in WEBI, it works fine.  Changing the 00:00:00 to something else doesn't make it reset to 00:00:00 when you click elsewhere.
    Trying with Field 1 and 2 does the same thing.
    Purpose of this is to be able to filter on parts of the day, like am (8am to noon) and pm (1pm to 5pm).
    BOXI 3.1 SP3
    Windows Server 2008 R2
    Netezza database
    Live Office 3.1 SP3 (Client)
    Excel 2007 (Client)
    Windows 7 (Client)
    Thanks,
    Edited by: Sing Phommavong on Feb 23, 2012 11:24 AM

    Hi n,
    please search for your problem in the forum. This has been discussed a lot of times before! (keywords: Excel LabVIEW timestamps)
    Excel stores timestamps as number of days (your 41866) and part of days (0.5798d = 13H55M). You need to convert those numbers using some (more or less) simple math to LabVIEW timestamps!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Put the current date and time in a string

    I am having trouble trying to put the current date and time from my Calendar object into a string
    any ideas?

    Calendar timeCal = Calendar.getInstance();
    timeCal.setTime(new Date(System.currentTimeMillis() - startTime ));
    String date = formatToTwoDigits(timeCal.get(Calendar.HOUR_OF_DAY))     + ":" +
    formatToTwoDigits(timeCal.get(Calendar.MINUTE))          + ":" +
    formatToTwoDigits(timeCal.get(Calendar.SECOND));
    private String formatToTwoDigits(int i) {
    String ret = null;
    i = i % 100;
    if (i < 10) {
    ret = "0" + Integer.toString(i);
    } else {
    ret = Integer.toString(i);
    return ret;
    You can figure out yourselve how to display the date, use other Calendar.XXX properties.
    Good luck!

  • Date and Time convertion in iChart

    Hi,
    My question is: The date and time field displayed in ichart is in a number format rather than a date and time format. Why?
    1. A query is created first to extract data from an oracle database. The date and time is converted to a string by using to_char(x, ‘yyyy-MM-dd, hh24:mi:ss) function.
    2. An Axcute transaction is then used to convert date and time from the first query to XML date format: As suggested by Martin Auer on Aug 22, 2006 in his answer to Sudha, I create an output document in Business Logic Editor and define a column in DateTime format. The output from xAcute is in XML date format as ‘2006-12-14T13:21:00’.
    3. The second query is created to display data for the Axcute transaction. The output from the second query in Text/xml type is shown as: <TIME>2006-12-14T13:21:00</TIME>
    4. However, when the date and time is displayed in iChart, the date and time on X-axis is presented as a number like 1.166.098.860.000,00. The data source for the chart is shown as: 2006-12-14 13:21:00
    5. The display template is derived from a template used on the training course and date format in template is set to yyyy-MM-dd HH:mm:ss. The template is tested on the data from PlasticResin database (training course), the date and time is presented in a correct format.
    Could someone please answer my question?
    Thanks,
    Xin

    Xin,
    If you test your query (I assume it is an Xacute query) and choose text/xml - what is the SQL data type for the date/time column?
    It sound like the chart is not recognizing the query as a time-sensitive query.
    Let me know what you find,
    Joe Montagna

  • Getting date and time format through RIDC call

    Hello,
    i want to set date and time features to my document , how can i get the date and time from RIDC call
    Regards
    Mayur Mitkari

    Hello
    I am performing this operation for getting date
    username = Util.getInstance().getCurrentUser().toString();
    IdcClient myIdcClient = Util.getInstance().getUCMConnection();
    IdcContext myIdcContext = new IdcContext(username);
    DataBinder binder = myIdcClient.createBinder();
    binder.putLocal("IdcService", "COLLECTION_GET_COLLECTIONS");
    binder.putLocal("hasCollectionID", "true");
    binder.putLocal("dCollectionID", parentNodeID);
    idcResponse = myIdcClient.sendRequest(myIdcContext, binder);
    DataBinder serverBinder = idcResponse.getResponseAsBinder();
    DataResultSet resultSet = serverBinder.getResultSet("COLLECTIONS");
    folderInfoList = new ArrayList<String>();
    resultInfoList = new ArrayList<List>();
    Iterator itr = resultSet.getRows().iterator();
    while (itr.hasNext())
    String dCreateDate = dataObject.get("dCreateDate").toString();
    but i am getting date in this format "2012-05-22 08:26:52Z"
    if i want the date in local timezone what can i do
    Regards
    Mayur Mitkari

Maybe you are looking for

  • Looping in XML publisher

    For this problem I went through following links Re: FOR loop in XML Publisher Re: How do you iterate through a string? Re: How can print blank rows for XML output report.. Based on the information I created one template as follow <?for-each:xdoxslt:f

  • Flex 3.0 to ejb

    Dear all, I need to connect from the flex 3.0 to ejb 3.0 what to write the build.xml for creating the ear file. Thanks & Regards, Mala.

  • I cannot click "Approve" in "my activities" to move on

    scsmsp installed in server 2012 and with sharepoint 2010 foundation.  I cannot click "Approve" in "my activities" to move on. What's the problem? can anyone help me? thank you so much!

  • IPod touch 2g Crashes

    Hi I have had my iPod touch for 2 years with out apple care and for some reason every 5 minutes my iPod touch would flash a white screen and then just die. I know apple cant do anything because I am out warrenty =( any suggestions?

  • Complete Your Season question re Game of Thrones

    I've bought two episodes of Game of Thrones Season 1 through iTunes and would like to take advantage of the Complete Your Season offer. But whilst I can see the series I want listed under Complete Your Season and I can see that two of the episodes ha