Seperate field containing date and time into two seperate columns

Hi
I have a column which contains entries which are in the format date time i.e. 27/10/2005 07:06:09
however i would like to have these as two seperate columns so the date is in one and the time in another.
how would i go about doing this in pl/sql?

im running a query in excel to graph a variable against time, however excel is not storing it correctly so when i try to use string manipulation to put the time on the x axis it's producing a long decimal number instead of the actual time.
i want to keep it in that format but also have it in two seperate columns. when excel makes the graph it will only read the same date over and over it won't get past the date to see the time changes.

Similar Messages

  • Inserting Date and Time into a date field

    Okay I am a bit of a Oracle newbie. I am trying to insert the following date and time into a date field and I don't know how to format the second part of the to_Date() function.
    Date/Time: 5/29/2003 7:58:45 PM
    Thanks,
    Branden

    I believe you would want
    to_date( '5/29/2003 7:58:45 PM', 'MM/DD/YYYY HH:MI:SS AM' )
    Note that tahiti.oracle.com has all of Oracle's documentation, including the very useful SQL & PL/SQL reference manuals, available for free.
    Justin

  • Combining Date and Time into 1 Field

    Post Author: Marc Vaccarino
    CA Forum: Formula
    Hi,
    I'm trying to write a formula to combine 2 fields (date and time) into one. I would like it to look like this.
    2/12/2007 + 12:00pm = 2/12/2007 12:00pm
    Thanks,

    Post Author: Marc Vaccarino
    CA Forum: Formula
    Thanks that worked but my problem is currently the date field I'm using has a date and time (12/12/2007 12:00am) and the time field has it as well  (12/12/2007 1:45am).  I've been going into crystal and clicked on format field and just showing the date and in the time field, just showing time. Then I would extract the report to excel then run another formula to get it to work. I'm looking to automate it a little. Any ideas??

  • How to find the Date and Time of Modification of Column in aTable?

    Hi all,
    Do  you know how to find the Date and Time of Addition of Column to a Particular Table?.
    I know however, How to find the modification time of the Table. Using the below Query :
    Select Object_Name, to_Char(Last_DDL_TIME, 'DD-Mon-YYYY HH24:MI:SS') Last_DDL from User_Objects where Object_Type = 'TABLE';
    Object_Name
    Last_DDL
    Employee
    20-Aug-2013 09:23:03
    I wanted to know the Creation or Modification Date and Timestamp of all columns of Employee Table?. Is it possible at all. If possible, How to get it?.
    Regards,
    Bhaskar M

    I agree with you on that. Since its a development enviornment I can remove the column but that not my point here.
    My whole purpose it to know whether we get the Column's Creation or Modification DateTime.

  • Insert current date and time into Oracle date type field

    I have a JDBC current date and time insert into Oracle 9i that almost works. It submits the current date and a fixed time into the Oracle date type field. I am using Tomcat 6.0.20.
    For example if I insert the data at 7:24:04 PM on Feb 16, 2010 it will insert as: 16-Feb-2010 12:00:00 AM
    The date part works but the time always shows 12:00:00 AM no matter what date or time the data is inserted.
    Here is what I have for my JDBC inserts and I also tried something with DateFormat:
    PreparedStatement ps; Date mydate = new Date(new java.util.Date().getTime()); //insert statement here.... stmt.setDate(1,mydate);
    I also tried:
    PreparedStatement ps; java.sql.Timestamp mydate = new java.sql.Timestamp(new java.util.Date().getTime()); SimpleDateFormat fmt = new SimpleDateFormat(.... //insert statement here.... ps.setTimestamp(1,fmt.format(mydate));
    Both keep submitting the date into Oracle as 16-Feb-2010 12:00:00 AM
    Anyway to get the current date and time? For example if I insert the data at 7:24.04 pm today it should show as 16-Feb-2010 07:24.04 PM in Oracle.

    sportsMarkr wrote:
    Date mydate = new Date(new java.util.Date().getTime());Please see the javadocs for java.sql.Date and note the part that says "...to zero"
    [http://java.sun.com/javase/6/docs/api/java/sql/Date.html]
    If you want a date and time then use java.sql.Timestamp.

  • Getting user name, date and time into 1 field

    Hi All,
    I have to add a new field in a customising include of AUFK table. This field should have user name, date and time. How do I store all these values in a single field of the table? Please help.

    Ok Thanks all. Will try your suggestions. But there is one problem. As i have already mentioned that i will have to display this detail in one field of the table control, The format of display is: user name should be seen above and the date and time separated by space should be displayed below the name. How can i ultimately display this in the table control. Do i have to create 2 different fields (one for name and other for date and time) in the AUFK table or is there any other solution?
    Thanks

  • Insert date and time into write to spreadsheet

    Easy question here
    I need save 4 arrays of data and insert the date and time that it was taken (LV 8.6)
    for example
    9/4/09 10:00:01 AM  4  6  7  2
    9/4/09 10:00:02 AM  4  6  7  2
    9/4/09 10:00:03 AM  4  6  7  2
    9/4/09 10:00:04 AM  4  6  7  2
    Any ideas, I can't wire the timestamp or date/time string right into the create array
    Thanks
    Chris
    Solved!
    Go to Solution.

    Ok
    the basic problem that I see is the the LabVIEW TimeStamp type is a cluster.  Converting it to a dbl gives you a value in seconds elapsed since 1904 Jan 1 12:00AM GMT and, your spreadsheet cannot interprate that (or display that) as a "TIME."   So, you want to convert it to a string (easy TS->String check the help for format options) BUT, you might want to pass all of your data as numbers into your spreadsheet so you can post-calculate or graph other outputs vs. TIME!  This little chunk of code .....
     converts a LV Timestamp to a number that Excel interperates as "the amount of days elapsed since 0 Jan 1900 @ 12:00AM LOCAL."  You will need to format the cell in Excel to display it as a date-time But it can be operated on and graphed against with only Excel's limitations (Excel followed the Lotus bug of erroneously assuming 1900 was a leap year, and Leap seconds are unrecognized)
    Enjoy!
    Message Edited by Jeff Bohrer on 08-06-2009 02:28 PM
    Jeff

  • CONCATENATE date and time into a text variable

    Hi ABAP Gurus,
      I would like to retrieve current system date and time and concatenate into a variable. I would really appreciate if someone could help me. I have the following code and i seem to get some kind of error.
    I would like my output to be like:
         "22.JUN.2006  Some Text  12:30:22"
    Code:
    data:  emtext     like TEMSG-EMTEXT.
    data:  date_output(50)  TYPE C.
        CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
           EXPORTING
               INPUT          =  SY-DATUM
           IMPORTING
                OUTPUT        =  date_output.
    SHIFT date_output RIGHT DELETING TRAILING SPACE.
      CONCATENATE date_output ': Some Custom Message '
       INTO emtext.
      Also, is there a function to convert time to text or conversion is not necessary?
    Thanks.
    Regards,
    bw_newbie

    Here is something a little closer to your requirement.
    report zrich_0001 .
    data: date(20) type c,
          time(10) type c,
          str type string.
    data: xT247 type T247.
    select Single * into xt247 from t247
              where MNR = sy-datum+4(2).
    concatenate  sy-datum+6(2) xt247-ktx sy-datum(4)
              INTO date separated by '.'.
    write sy-uzeit to time.
    concatenate date 'SomeText' time into str separated by space.
    write:/ str.
    Regards,
    Rich Heilman

  • Doubt in inserting Date and time into the table

    Hi i have created a table with two columns "Order_ID" and "Order_date" as
    create table test
    order_id integer,
    order_date date default sysdate
    Now i insert one row as
    insert into test(order_id) values(1);
    now i get the output as
    ORDER_ID ORDER_DAT
    1 05-JUN-12
    But i need to insert the current system time also into the Order_date column.
    How can i achieve this ???

    it works OK for me!
    bcm@bcm-laptop:~$ sqlplus user2/user2
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 4 20:19:57 2012
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    20:19:58 SQL> @test1
    20:20:01 SQL> create table test1
    20:20:01   2  (
    20:20:01   3  order_id integer,
    20:20:01   4  order_date date default sysdate
    20:20:01   5  );
    Table created.
    20:20:01 SQL>
    20:20:01 SQL> insert into test1(order_id) values(1);
    1 row created.
    20:20:01 SQL> select * from test1;
      ORDER_ID ORDER_DATE
          1 2012-06-04 20:20:01
    20:20:01 SQL>

  • Getting Date and Time into a single field

    Hi,
    I am loading from a flat file which has field Start time which comes in the format of MM/DD/YYYY  HH:MM:SS ( Hour: Minute: Second). How can i bring this and store this in BW as one single field. Even in the source it is a single field.
    I would also need to use this info object as a key in my ODS
    Please advise,
    Thanks
    Rashmi.
    Edited by: Rashmi Vellampalli on Oct 8, 2008 7:32 PM

    >
    Rashmi Vellampalli wrote:
    > Hi,
    >
    > I am loading from a flat file which has field Start time which comes in the format of MM/DD/YYYY  HH:MM:SS ( Hour: Minute: Second). How can i bring this and store this in BW as one single field. Even in the source it is a single field.
    > I would also need to use this info object as a key in my ODS
    >
    > Please advise,
    >
    > Thanks
    >
    > Rashmi.
    >
    > Edited by: Rashmi Vellampalli on Oct 8, 2008 7:32 PM
    You should user an infoObject/field for tyoe CHAR, length 24. Once you read this, in transfer rules, write an ABAP Code to seperate Data, time and AM, PM. Once you read all the characters from your source, its very simple ABAP to seperate them in Transfer Rules.
    Uday-Ram Chamarthy

  • How do I enter in a Date and Time into the InputDate tag

    Using the default DataEditComponent.jsp page, I have an entity object with a Date in it. However, when you click on the calendar icon and populate the field with the date you can not add a time. How do you add a time to this field.
    Create Date : 2002-08-23 and I would like to input 2002-08-23 16:30
    Thanks,

    Change your domain type for your entity object to Timestamp. You also need to edit your control hints to use a format that includes the time portion. Once this is done, you will be able to edit\update\display the time portion.

  • Convert Local Date and Time into GMT

    In Oracle how to convert date & time in GMT. Suppose the input will be local date & time e.g. ‘IN’, ‘15/11/2010 15:20:30’ ( country Code, DD/MM/YYYY Hr:Min:Sec in 24hr format) output should be in GMT format.

    I don't think this should be in the OLAP subforum. At least try to look for the correct section before posting next time.
    Apart from that, you can try a combination of the From_Tz and Tz_Offset functions.
    http://www.techonthenet.com/oracle/functions/from_tz.php
    http://www.techonthenet.com/oracle/functions/tz_offset.php
    I hope it helps.
    Joan

  • Date (date and time) with MySQL, register here!

    Hi,
    Summary:
    I have a page (form) to capture attendance. It works, it allows user to enter their attendance details. On click, it writes to the database - table. The date is not captured on the form. I want to date stamp this by inserting a date (date and time - declared field). I will provide source code. Please pin point what code I should be inserting and wheres about within this code.
    Question:
    Insert date and time into database table -
    Code:
    <?php require_once('Connections/dbAttendance.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form")) {
      $insertSQL = sprintf("INSERT INTO attendlist (Windowsid, title, firstname, surname, extension, mobile, jobrole, course, cpg, mgrname, room) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['textfield'], "text"),
                           GetSQLValueString($_POST['select'], "text"),
                           GetSQLValueString($_POST['textfield2'], "text"),
                           GetSQLValueString($_POST['textfield3'], "text"),
                           GetSQLValueString($_POST['textfield4'], "text"),
                           GetSQLValueString($_POST['textfield5'], "text"),
                           GetSQLValueString($_POST['select5'], "text"),
                           GetSQLValueString($_POST['select2'], "text"),
                           GetSQLValueString($_POST['select4'], "text"),
                           GetSQLValueString($_POST['textfield7'], "text"),
                           GetSQLValueString($_POST['select3'], "text"));
      mysql_select_db($database_dbAttendance, $dbAttendance);
      $Result1 = mysql_query($insertSQL, $dbAttendance) or die(mysql_error());
      $insertGoTo = "Thankyou.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    mysql_select_db($database_dbAttendance, $dbAttendance);
    $query_rsAttendance = "SELECT * FROM attendlist";
    $rsAttendance = mysql_query($query_rsAttendance, $dbAttendance) or die(mysql_error());
    $row_rsAttendance = mysql_fetch_assoc($rsAttendance);
    $totalRows_rsAttendance = mysql_num_rows($rsAttendance);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Delegate Register</title>
    <link href="Registerpage.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
    </head>
    <?php
    $date = date(“format”, $timestamp);
    ?>
    <body>
    <div class="container">
      <div class="header"><img src="Cerner At Imperial2.jpg" width="960" height="150" alt="" /><!-- end .header --></div>
      <div class="content">
        <h3>Register: <?php echo "Date  - ".date("d/m/Y - H:ia")?></h3>
        <form action="<?php echo $editFormAction; ?>" method="post" name="form">
          <table width="780" border="0">
            <tr>
              <td><div align="right">User ID *</div></td>
              <td><span id="sprytextfield1">
                <input name="textfield" type="text" id="textfield" tabindex="1" size="18" maxlength="10" />
              <span class="textfieldRequiredMsg">A value is required.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">Title *</div></td>
              <td><span id="spryselect1">
                <select name="select" id="select" tabindex="2">
                  <option value="0">Select</option>
                  <option value="1">Ms</option>
                  <option value="2">Mrs</option>
                  <option value="3">Mdm</option>
                  <option value="4">Dr</option>
                  <option value="5">Mr</option>
                  <option value="6">Prof</option>
                </select>
              <span class="selectRequiredMsg">Please select an item.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">First name*</div></td>
              <td><span id="sprytextfield2">
                <input name="textfield2" type="text" id="textfield2" tabindex="3" size="30" maxlength="30" />
              <span class="textfieldRequiredMsg">A value is required.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">Surname *</div></td>
              <td><span id="sprytextfield3">
                <input name="textfield3" type="text" id="textfield3" tabindex="4" size="30" maxlength="30" />
              <span class="textfieldRequiredMsg">A value is required.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">Contact / Bleep *</div></td>
              <td><span id="sprytextfield4">
                <input name="textfield4" type="text" id="textfield4" tabindex="5" size="30" maxlength="30" />
              <span class="textfieldRequiredMsg">A value is required.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">Mobile no: (optional)</div></td>
              <td><input name="textfield5" type="text" id="textfield5" tabindex="6" size="20" maxlength="20" /></td>
              <td> </td>
            </tr>
            <tr>
              <td> </td>
              <td> </td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">Job Role *</div></td>
              <td><span id="spryselect5">
                <select name="select5" id="select5" tabindex="7">
                  <option value="0">Select </option>
                  <option value="1">Doctor</option>
                  <option value="2">Nurse IP</option>
                  <option value="3">Nurse OP</option>
                  <option value="4">Midwife</option>
                  <option value="5">Booking Clerk</option>
                  <option value="6">Medical Secretary</option>
                  <option value="7">OP Receptionist</option>
                  <option value="9">CNS/NP</option>
                  <option value="10">Tester</option>
                </select>
              <span class="selectRequiredMsg">Please select an item.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">Manager's Name *</div></td>
              <td><span id="sprytextfield5">
                <input name="textfield7" type="text" id="textfield7" tabindex="8" size="30" maxlength="30" />
              <span class="textfieldRequiredMsg">A value is required.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td> </td>
              <td> </td>
              <td> </td>
            </tr>
            <tr>
              <td> </td>
              <td> </td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">Course *</div></td>
              <td><span id="spryselect2">
                <select name="select2" id="select2" tabindex="9">
                  <option value="0">Select</option>
                  <option value="1">Demo</option>
                  <option value="2">Doctors</option>
                  <option value="9">CNS/NP</option>
                  <option value="3">Nurse IP</option>
                  <option value="4">Nurse OP</option>
                  <option value="5">Midwife</option>
                  <option value="6">Booking Clerk</option>
                  <option value="7">Medical Secretary</option>
                  <option value="8">OP Receptionist</option>
                </select>
              <span class="selectRequiredMsg">Please select an item.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">Location *</div></td>
              <td><span id="spryselect3">
                <select name="select3" id="select3" tabindex="10">
                  <option value="0">Select </option>
                  <option value="1">CHX 12 Floor Rm 1</option>
                  <option value="2">CHX 12 Floor Rm 2</option>
                  <option value="3">CHX 10 West </option>
                  <option value="4">HH N207 </option>
                  <option value="5">HH W12 Conference</option>
                  <option value="6">SMH Rm a</option>
                  <option value="7">SMH Rm b</option>
                  <option value="8">SMH Ming Wing Rm 5</option>
                  <option value="9">SMH Ming Wing Rm 3</option>
                </select>
              <span class="selectRequiredMsg">Please select an item.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">CPG *</div></td>
              <td><span id="spryselect4">
                <select name="select4" id="select4" tabindex="11">
                  <option value="0">Select </option>
                  <option value="1">CPG 1 - Medicine</option>
                  <option value="2">CPG 2 - Surgery and Cancer</option>
                  <option value="3">CPG 3 - Specialist Services </option>
                  <option value="4">CPG 4 - Circulatory Services and Renal Medicine</option>
                  <option value="5">CPG 5 - Womens and Children</option>
                  <option value="6">CPG 6 - Clinical and Investigative Sciences</option>
                  <option value="7">CPG 7 - Private Patients</option>
                  <option value="8">Others</option>
                </select>
              <span class="selectRequiredMsg">Please select an item.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td> </td>
              <td><input name="button" type="submit" id="button" value="Submit" /></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="center">*Mandatory fields </div></td>
              <td> </td>
              <td> </td>
            </tr>
          </table>
          <input type="hidden" name="MM_insert" value="form" />
        </form>
    <!-- end .content --></div>
      <div class="footer">
    <p align="center">
        <a href="http://validator.w3.org/check?uri=referer"><img
          src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
          <p align="center"> Cerner@Imperial ICT Training Team </p>
    </p>
      <!-- end .footer --></div>
      <!-- end .container --></div>
    <script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["blur", "change"]});
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {validateOn:["change", "blur"]});
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {validateOn:["blur", "change"]});
    var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "none", {validateOn:["blur", "change"]});
    var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "none", {validateOn:["blur", "change"]});
    var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2", {validateOn:["change", "blur"]});
    var spryselect3 = new Spry.Widget.ValidationSelect("spryselect3", {validateOn:["change", "blur"]});
    var spryselect4 = new Spry.Widget.ValidationSelect("spryselect4", {validateOn:["change", "blur"]});
    var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "none", {validateOn:["blur", "change"]});
    var spryselect5 = new Spry.Widget.ValidationSelect("spryselect5", {validateOn:["blur", "change"]});
    </script>
    </body>
    </html>
    <?php
    mysql_free_result($rsAttendance);
    ?>

    There are several ways. One is to get the date from the php time() function and use that in your insert statement. Another is to use MySQL CURDATE() function. But probably the easiest and best is to simply define the default value for the date/time column as the current date/time and exclude it from the insert statement. No code changes necessary.
    http://dev.mysql.com/doc/refman/5.0/en/timestamp-initialization.html

  • Convert XMP Date and Time

    Hi, in my script I am trying to read the Date and Time using the XMP functions of a selected file in bridge.  Then, I want to convert that date and time into a format that looks like: "01/12/10 | 01:23 PM" and write that to another metadata field like the description.  Im stuck on trying to convert the date and time into what I want it to look like?  Can anyone help, thanks!
    Here is the part of the code I'm having trouble with:
    When I read the dateTimeOriginal property of the file, it is in an unfriendly format.  It looks odd and shows the time zone.  The commented lines is code that I have tried, but didn't work.  I was trying to convert the XMPDateTime object into a Date object so I can adjust the format, but I haven't been successful.
    var myXmpFile = new XMPFile( selectedFile.fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE);      
          var myXmp = myXmpFile.getXMP();   
          var Name = myXmp.getProperty(XMPConst.NS_EXIF, "DateTimeOriginal");
          var date = new XMPDateTime(new Date(Name));
          var date2 = new Date(date);
          //dateFormat.masks.portfolioDate = 'mm/dd/yy "|" hh:MM TT';
    //date.format("portfolioDate");
    //date2.format("mm/dd/yy");
    alert(date2.toString());
    Name.convertToLocalTime();
    Name.toString();
    alert(Name);

    Thanks for helping me out Paul.  I just have one more small problem.  I am trying to access the Headline XMP property, and I know i need to use the IPTC Core property, but it doesn't seem to work.  Here is my current code, can you help me out?
    var selectedFile = thumb.spec;   
    var myXmpFile = new XMPFile( selectedFile.fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE);      
    var myXmp = myXmpFile.getXMP();   
    var xmpString = myXmp.getProperty(XMPConst.NS_EXIF, "DateTimeOriginal").toString();
                alert(xmpString);
    var xmpString2 = myXmp.getProperty(XMPConst.NS_IPTC_CORE, "Headline").toString();
    alert(xmpString2);
    var dat =xmpString.match(/(\d+).(\d+).(\d+).(\d+).(\d+).(\d+)/);
    var amOrPm = "AM";
    var hours = Number(dat[4]);
    if (hours > 11) amOrPm = "PM";
    if (hours > 12) hours = hours - 12;
    if (hours > 11) amOrPm = "PM";
    if (hours < 10) hours = '0' + hours;
    var dateString = dat[2]+"/"+dat[3]+"/"+dat[1].substr (2) +" | "+ hours +':'+dat[5]+ ' ' +amOrPm;

  • Why are date and time strings lost when indexing an array in a for loop

    Hi, 
    I have an application where i'm reformatting data from a spreadsheet for graphical display on a LabVIEW dashboard.
    the original spreadsheet has date and time values in separate columns, and i'm merging them and converting to a timestamp value.  But something's not working.  Does anyone know why the string value is lost when the array indexes into this for loop?
    Attachments:
    failed array index.png ‏142 KB

    Can you attach your VI with some typical values? (e.g. create in indicator on the 2D array, run your VI, then turn the indicator (now containing data) into a diagram constant). Place the FOR loop related code and that diagram constant into a new VI and attach it here.
    How many times does the FOR loop run? Could it be that the last element of each 1D array is an empty string? (unless you put a wait inside the FOR loop, you'll never see the other elements in the probe)
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for