When retrieving a 'date time' value, why is there a '.0' appended?

Hi
I am storing 'date time' values in a MySQL 'DATETIME' column.
I retrieve the value by executing code (more or less) like this:
ResultSet resultSet = statement.executeQuery(query);
// other statements here...
String theDate = resultSet.getString(i);If the 'date time' being stored is *2008-08-26 16:39:21*, the code returns this: *2008-08-26 16:39:21.0*
Is there same 'simple' way to retrieve the value without a *.0* appended?
Thanks
Pete

Hi Roy
I'm not quite with you.
You should get it from the database as a date object.Do you mean something like this?:
ResultSet.getDate()This returns a java.sql.Date object.
For presentation use SimpleDateFormatter to display it the way you want toI presume you are referring to java.text.SimpleDateFormat ? In that case I require the date as a java.util.Date object.
Perhaps you could clarify a bit more?
Thanks
Pete

Similar Messages

  • How to get the date-time value?

    Hi All
    I have a a field "START_TIME of type DATE". The value stored for that particular field is of the form "10/17/2006 2:23:40 PM" i.e. a date-time value.
    Now when i try to get the values stored in the table in which the START_TIME field is defined i get the value in the form of "10/17/2006" .... I missed out the time information. Why is this so? How do i get the complete value as a string?
    Thanks in advance. Vijay

    Hi All
    I have a a field "START_TIME of type DATE". The value stored for that particular
    field is of the form "10/17/2006 2:23:40 PM" i.e. a date-time value.Actually it is stored as an internal date format (see my example SQL below, taking note of the dump'ed data).
    Now when i try to get the values stored in the table in which the START_TIME field is defined i get the
    value in the form of "10/17/2006" ....
    I missed out the time information. Why is this so?
    How do i get the complete value as a string?The value you see on the screen is the display format and this is determined by the client application that is displaying the date and what settings it is using. If a date column is retrieved from the database then all the data (date and time) is given back, but it's up to the application how that is displayed. e.g. you may see it differently if you view it is SQL*Plus against some other tool such as TOAD.
    To change the display settings you can change your NLS_DATE_FORMAT setting or whatever setting is suitable for your client application, or you can use TO_CHAR with a format string to specify the components you want to see. The different with TO_CHAR is that you are converting it to a character string so don't attempt to do any date type comparisons on it after that conversion, e.g. don't try and compare if one date is greater than another, without converting it back to DATE datatype first.
    SQL> create table t (x date);
    Table created.
    SQL> insert into t (x) values (sysdate);
    1 row created.
    SQL> select x from t;
    X
    02-JUN-08
    SQL> select x, dump(x) from t;
    X
    DUMP(X)
    02-JUN-08
    Typ=12 Len=7: 120,108,6,2,13,32,51
    SQL> alter session set nls_date_format = 'DD/MM/YYYY HH24:MI:SS';
    Session altered.
    SQL> select x, dump(x) from t;
    X
    DUMP(X)
    02/06/2008 12:31:50
    Typ=12 Len=7: 120,108,6,2,13,32,51
    SQL>

  • Invalid date/time value error

    I downloaded a trial version of Acrobat XI Pro when I try to save or edit and resave a document I get 'invalid date/time value', error.  I presume it's set for the US and not the UK, can you tell me where I can change the date/time format?
    I'm running on Windows 7

    Hi Rave
    Susan's on leave at the moment so I'm replying on her behalf in the vain hope we can sort things before she gets back and before the trial period runs out!  I'm not sure I understand what you mean by column of date and time - we have a review date in the Word document before we pdf but that's all.  Yes we are saving to a sharepoint server.
    Thanks

  • Problem with DateDiff and Date/Time value.

    The form below displayed perfectly until I added the line for DateDiff between VacStart and VacEnd. I receive an error message;
    An error occurred while evaluating the expression:
    #DateDiff("w", "VacStart", "VacEnd")#
    Error near line 48, column 51.
    Parameter 2 of function DateDiff which is now "VacStart" must be a date/time value
    The error occurred while processing an element with a general identifier of (#DateDiff("w", "VacStart", "VacEnd")#), occupying document position (48:50) to (48:86).
    I have tried changing the DB value to Date/Time as well as Text and get the same result each time. Any help would be greatly appreciated. Here is my code:
    <cfquery datasource="manna_premier" name="TM_log">
    SELECT *
    FROM TMStatusLog
    </cfquery>
    <!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=iso-8859-1" />
    <title>TM Status Log</title>
    </head>
    <body>
    <p align="center" class="style4">Territory Manager Status Log </p>
    <table width="1448" border="0">
      <tr>
        <th width="71"><span class="style3">ID No.#</span></th>
    <th width="88"><span class="style3"> Date</span></th>
    <th width="166"><span class="style3">TM Name</span></th>
    <th width="129"><span class="style3">Status</span></th>
    <th width="139"><span class="style3">Vac Start </span></th>
    <th width="137"><span class="style3">Vac End</span></th>
    <th width="203">Ttl Days </th>
    <th width="203"><span class="style3">DSR Ride Along Name</span></th>
    <th width="274"><span class="style3">Service Call Name</span></th>
      </tr><cfoutput query="TM_log">
      <tr>
        <td><span class="style3">#ID#</span></td>
        <td><div align="center"><span class="style3">#DateFormat(LogDate, "mm/dd/yyyy")#</span></div></td>
        <td><div align="center"><span class="style3">#TerritoryManager#</span></div></td>
        <td><div align="center"><span class="style3">#Status#</span></div></td>
        <td><div align="center"><span class="style3">#DateFormat(VacStart, "mm/dd/yyyy")#</span></div></td>
        <td><div align="center"><span class="style3">#DateFormat(VacEnd, "mm/dd/yyyy")#</span></div></td>
    <cfif VacStart IS NOT "Null">
        <td><div align="center"><span class="style3">#DateDiff("w", "VacStart", "VacEnd")#</span></div></td>
    </cfif>
        <td><div align="center"><span class="style3">#DSRName#</span></div></td>
        <td><div align="center"><span class="style3">#ServiceName#</span></div></td>
      </tr></cfoutput>
    </table>
    </body>
    </html>

    Error Diagnostic Information
    An error occurred while evaluating the expression:
    #DateDiff("w", VacStart, VacEnd)#
    Error near line 47, column 48.
    Parameter 2 of function DateDiff which is now "" must be a date/time value
    The error occurred while processing an element with a general identifier of (#DateDiff("w", VacStart, VacEnd)#), occupying document position (47:47) to (47:79).
    Any other suggestions? Thanks!
    Well... what does the error message say?
    Parameter 2 of function DateDiff which is now "" must be a date/time value
    What does this tell you?  What is parameter 2 of that function call?  It's VacStart.  So it's saying VacStart is an empty string, and it's saying an empty string is not a valid value for that parameter.
    So the question you need to ask yourself is whether you expect VacStart to be an empty string?  Or do you perhaps expect it to be a date?  I would guess you're expecting it to be a date.  So the question becomes... Why is VacStart an empty string?
    Adam

  • How to substract two date&time values

    Well,i just need to substract last visited date&time value from systemdate. The last visited date&time(from the filed named SONBULUNMAZAMANI, ) is selected from table (IHALE_KATILIMCILAR ) in the format DD-MM-RRRR HH24:MI and systemdate is in the same format. And i need to get value in minutes. Then i need to check if the value is greater then 20 minutes, finally i will update database and set IHALE_KATILIMCILAR.AKTIF=0. Here is the code i used;
    DECLARE
    MinDiff number;
    DateTime1 ihale_katilimcilar.sonbulunmazamani%TYPE;
    BEGIN
    select t.sonbulunmazamani into DateTime1 from ihale_katilimcilar t where t.ihlkodu=141 and t.ihlaltktgkodu=132 and t.id_iliski=193;
    MinDiff := ABS( TO_DATE( TO_CHAR(SYSDATE, 'DD-MM-RRRR') || TO_CHAR(SYSDATE , 'HH24:MI'), 'DD-MM-RRRR HH24:MI' ) - TO_DATE( TO_CHAR(DateTime1, 'DD-MM-RRRR') || TO_CHAR(DateTime1, 'HH24:MI'), 'DD-MM-RRRR HH24:MI' ) );
    DBMS_OUTPUT.PUT_LINE('Difference is ' || MinDiff);
    END;
    However the result i get is always pointed values such as ,1895833333333333333333333333333333333333. How can i handle this?
    And here is the scripts of table:
    create table IHALE_KATILIMCILAR
    KULADI VARCHAR2(20),
    SONUC NUMBER(1),
    AKTIF NUMBER(1) default 1,
    SRKTKODU VARCHAR2(10) not null,
    SONBULUNMAZAMANI DATE default sysdate,
    SIRA NUMBER(1) default 0,
    MESAJ VARCHAR2(200),
    ID NUMBER(6) not null,
    IHLKODU NUMBER not null,
    IHLALTKTGKODU VARCHAR2(10) not null,
    ID_ILISKI NUMBER,
    IHLSIRA NUMBER(1) default 0,
    CEVAP VARCHAR2(200)
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('asd', null, 1, '4444', to_date('19-02-2008 10:29:44', 'dd-mm-yyyy hh24:mi:ss'), 0, 'süre talep 2', 76, 145,
    '135', 345, 0, 'al sna süre 77');
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('asd', null, 1, '4444', to_date('20-02-2008 14:49:52', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 77, 145, '135',
    345, 0, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('asd', null, 1, '4444', to_date('19-02-2008 10:29:44', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 78, 145, '135',
    345, 0, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('asd', null, 1, '4444', to_date('19-02-2008 10:29:44', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 79, 145, '135',
    345, 0, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KEMMM', null, 0, '42', to_date('17-03-2008 09:29:20', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 63, 141, '134',
    191, 0, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('MLK', null, 1, '46', to_date('07-03-2008 09:52:20', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 64, 141, '134', 192,
    0, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KEM.ESM', null, 1, '44', to_date('06-03-2008 13:28:50', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 61, 145, '135',
    189, 0, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KE.ES', null, 1, '45', to_date('07-03-2008 11:16:41', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 69, 141, '133',
    197, 0, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KEMMM', null, 0, '42', to_date('17-03-2008 09:29:20', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 65, 141, '132',
    193, 1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KE.ES', null, 1, '45', to_date('07-03-2008 11:16:41', 'dd-mm-yyyy hh24:mi:ss'), 2, null, 66, 141, '132',
    194, 1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('MLK', null, 1, '46', to_date('07-03-2008 09:52:20', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 67, 141, '132', 195,
    1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KEMMM', null, 0, '42', to_date('17-03-2008 09:29:20', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 68, 141, '133',
    196, 0, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KEM.ESM', null, 1, '44', to_date('12-03-2008 15:00:58', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 70, 142, '252',
    198, 1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KE.ES', null, 1, '45', to_date('10-03-2008 10:08:17', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 71, 142, '252',
    199, 1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KEM.ESM', null, 1, '44', to_date('10-03-2008 10:08:56', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 72, 143, '253',
    200, 1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('MLK', null, 1, '46', to_date('12-02-2008 13:34:40', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 73, 143, '253', 201,
    1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KE.ES', null, 1, '45', to_date('06-03-2008 14:09:40', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 60, 145, '136',
    188, 1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KEM.ESM', null, 1, '44', to_date('06-03-2008 13:28:50', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 74, 145, '136',
    202, 1, null);
    insert into IHALE_KATILIMCILAR (KULADI, SONUC, AKTIF, SRKTKODU, SONBULUNMAZAMANI, SIRA, MESAJ, ID, IHLKODU,
    IHLALTKTGKODU, ID_ILISKI, IHLSIRA, CEVAP)
    values ('KE.ES', null, 1, '45', to_date('06-03-2008 14:09:40', 'dd-mm-yyyy hh24:mi:ss'), 0, null, 75, 145, '135',
    203, 0, null);
    Thanks...

    What version of SQLServer do you have? Datediff is not an Oracle built-in function.
    OP:
    THe difference between two dates in Oracle is in days. The decimal portion refers to partial days, so you need to convert that to the required precision. Also, both sysdate and your column are date type, and contain a time portion, so you do not need all the to_date/to_char stuff. Something like:
    SQL> SELECT end_dt, start_dt, (end_dt - start_dt) * 24*60 diff
      2  FROM (SELECT sysdate end_dt, TRUNC(sysdate) start_dt
      3        FROM dual);
    END_DT             START_DT                 DIFF
    17-mar-08 10:39:39 17-mar-08 00:00:00     639.65John

  • Problem in storing date & Time value

    How to store the Date & time value in 1 textfield only.In my case i am selectecting The Time from two LOV's (HH & MM),then Date value is selecting from simple i/ptext,
    I want to store the (Date+HH+MM) in the date field.......
    code is....
    public String CalculationM() {
    BindingContainer bindings = getBindings();
    DCIteratorBinding dcIterBinding = (DCIteratorBinding)bindings.get("Timeview1Iterator");
    RowSetIterator row= dcIterBinding.getLovRowSetIterator();
    String i=selectOneChoice5.getValue().toString();
    int index=Integer.parseInt(i);
    int index2=index+1;
    Row r= row.getRowAtRangeIndex(index2);
    String val=r.getAttribute("Hour").toString();
    String i1=selectOneChoice6.getValue().toString();
    // System.out.println("HH index="+index2+" MM index is="+i1);
    int index1=Integer.parseInt(i1);
    int index3=index1+1;
    Row r1=row.getRowAtRangeIndex(index3);
    String val1=r1.getAttribute("Minutes").toString();
    int valint=Integer.parseInt(val);
    String valnew;
    if(valint<=12)
    {  if(valint==12)
    valnew=val+":"+val1+":"+"PM";
    else
    valnew=val+":"+val1+":"+"AM";
    else
    val=String.valueOf((valint-12));
    valnew=val+":"+val1+":"+"PM";
    valnew=val+val1;
    String Dateis= inputText4.getValue().toString();
    String Date1=Dateis+" "+valnew;
    System.out.println("TOTAl Date Is="+Date1);
    try
    { SimpleDateFormat sdf = new SimpleDateFormat("dd:MM:yyyy hh:mm");
    java.util.Date date = sdf.parse(Date1);
    java.sql.Date sqlDate = new java.sql.Date(date.getTime());
    oracle.jbo.domain.Date ojdd = new oracle.jbo.domain.Date(sqlDate);
    FacesContext context = FacesContext.getCurrentInstance();
    Application app = context.getApplication();
    DCBindingContainer binding = (DCBindingContainer) app.getVariableResolver().resolveVariable(context, "bindings");
    binding.findIteratorBinding("AppointDetView1Iterator").getCurrentRow().setAttribute(7,ojdd);
    catch(ParseException e)
    System.out.println("Error is:"+e.toString());
    OperationBinding operationBinding =bindings.getOperationBinding("Commit");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    return null;
    But i am getting error ....the Time is not storing in Date field bt the Time which we r giving with the Date field is storing.......
    My Date Attribute has Date format as dd-MM-yyyy hh:mm:aa
    If i changed it to dd-MM-yyyy then .... The value "12-3-2008" is not a valid date. Valid example: "29-11-2005 ".this error is getting
    Error
    - Not a date.
    Plz help me in this case ...wil be very thankful for ur help.........

    actually i am inputting the value 12-03-2008 but i am getting tha error which i hav told before....
    plz reply me....
    Message was edited by:
    user553181

  • TS3920 iPad 1 w/ iOS 5 on Barcelona time zone location when Automatically Set Date/Time is turned on.  How do I get all of my devices back to PST time?

    After returning from an extended trip in Spain, my iPad 1 with iOS 5 retains the Barcelona location when "Automatically Set Date/Time".  Most of my Apple devices are affected, how do I get all of my devices back to PST time?  Thanks!

    Turn off Automatically Set Date/Time and set your time zone.

  • How can I have Safari save my opened web pages when I quit so that when I open next time they will be there?

    How can I have Safari save my opened web pages when I quit so that when I open next time they will be there? I can do that in Firefox automatically, but can't seem to find how to do it in Safari.  I'm thinking maybe it's just now possible yet?

    From your Safari menu bar click History / Reopen All Windows from Last Session.
    Or..
    Glims can  re open tabs from a previous session if that helps.
    http://www.machangout.com/
    Compatible with Snow Leopard v10.6 and Safari 5+ and it's free.

  • I'm confused about sound on my iPad 2. I know it has speakers and it makes sounds for notifications, etc. But when I play the Time Warner TV app, there is no sound. Do I need to buy speakers or headphones?

    I'm confused about sound on my iPad 2. I know it has speakers and it makes sounds for notifications, etc. But when I play the Time Warner TV app, there is no sound. Do I need to buy speakers or headphones?

    Here is my situation, iPad 1 Time Warner app works fine with or without headphones, ipad2 I can unplug headphones and it works but when headphones are plugged in I can barely hear it even cranked up, my husbands ipad2 works fine with both so what that tells me is that there is something physically possibly programmed differently.  It really makes no sense.  I might just take my ipad2 back and swap it out.  It is weird all the other sound through the iPad comes through on headphones and speakers fine.  You are not alone with your time Warner app sound issues.

  • How to get the local date time value

    Hi,
    I am Australian time zone. I have been using the below code to retrieve meeting start date time from my Sharepoint Calendar.
    Console.WriteLine((DateTime)oListItem["EndDate"]);
    This used to return the correct local date up until today. I simply read this and store in a database. Today when I check I can see that the date returned is different to what I can see in the Sharepoint calendar.
    For and example: In Sharepoint calendar I can see the date as "Oct 1 2014 5:30 PM". But my above code now returns "Oct 1 2014 6:30 AM". This looks to me like UTC time.
    But up until today my code above returned the correct local date. Is there any reason for this sudden chahge?
    When I read the TimeZone in sharepoint (using RegionalSettings.TimeZone method) it return the correct time zone too.
    Any help would be appreciated. I am concerned that I have to now go and change all places where I read the date time from sharepoint.
    Thanks, Bimal
    Bimal

    Hi,
    According to your post, my understanding is that you had some issue about the calendar time.
    As your code worked well before, the issue may be related to the calendar itself or the site.
    As the TimeZone is correct, you can recreate a new calendar to check whether it works.
    Or create a new site to check whether it works.
    I had made a simple demo to retrieve the calendar EndDate time, you can also check with it.
    using (SPSite site = new SPSite("http://YourSiteURL "))
    using (SPWeb web = site.OpenWeb())
    SPList spList = web.Lists.TryGetList("Calendar1");
    if (spList != null)
    SPQuery qry = new SPQuery();
    qry.ViewFields = @"<FieldRef Name='EventDate' /><FieldRef Name='EndDate' />";
    SPListItemCollection listItems = spList.GetItems(qry);
    foreach (SPListItem item in listItems)
    string startTime = item["EventDate"].ToString();
    string endTime = item["EndDate"].ToString();
    Console.WriteLine("Start Time:"+startTime);
    Console.WriteLine("End Time:"+endTime);
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • Sharepoint Filed Date time value

    Hi,
    I am updating a date field value with last modified date.
    but it is showing different date than what is there in modified date.
    Can anyone tel me why it is so and how to get the correct date
    Thanks.
    Nishanthi N

    I am giving the value to a div using sharepointwebcontrols .
    <div class="a">
    <b> ModifiedDate</b><SharePointWebControls FieldName="Modified" runat="server"/>
    </div>
    if the modified date is 4/28/2014 11:00 Am means am getting 4/28/2014 4:00AM
    Nishanthi N

  • Error in displaying date time value in Thai Windows OS browser.

    Hi,
    I have a problem displaying date time in the browser which is installed with Thai Windows OS. The time portion (the subset of datetime) does seemed to show correctly. Initially i am suspecting the virtual machine problem but i tried on bith java and microsoft vm, the result seemed the same. I tried to look in the source of the page and the character is just the same as the incorrect character displayed in the browser. The html source is -->
    <tr class="TableData">
         <td width="76">14/01/04 12:17:06 H-@5H"</td>
    the time is displaying incorrectly. I am not sure its due to any setting in the BEA weblogic server. FYI i am now using WLS6.1(SP2) version. Hope and appreaciate a prompt reply. Thanks a zillion in advance.
    Regards,
    Sunny

    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=noclassdeffounderrorIWDAbstractTableColumn&adv=false&sortby=cm_rnd_rankvalue
    java.lang.NoClassDefFoundError
    Error while binding node attribute to a  UI  element (table)
    Problem with NWDS 7
    class def error?

  • How to retrieve the data/property value from portalapp.xml

    Hi I would like to retrive the some common data from the portalapp.xml file
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
          </application-config>
      <components>
        <component name="DynZMMGR">
          <component-config>
            <property name="ClassName" value="DynZMMGR"/>
            <property name="SecurityZone" value="DynZMMGR/high_safety"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/DynJspZMMGR.jsp"/>
          </component-config>
          <component-profile/>
        </component>
        <component name="dynpagedel">
          <component-config>
            <property name="ClassName" value="dynpagedel"/>
          </component-config>
          <component-profile/>
        </component>
        <component name="VARIANTLIST">
          <component-config>
            <property name="ClassName" value="com.sap.ep.r3rpts.VARIANTLIST"/>
            <property name="SecurityZone" value="com.sap.ep.r3rpts.VARIANTLIST/high_safety"/>
          </component-config>
          <component-profile/>
        </component>
        <component name="DynZMM33">
          <component-config>
            <property name="ClassName" value="DynZMM33"/>
            <property name="SecurityZone" value="DynZMM33/high_safety"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/DynJspZMM33.jsp"/>
          </component-config>
          <component-profile/>
        </component>
      </components>
      <services/>
    </application>
    The above is my portalapp.xml file .
    I want to retrieve the common data across the component.
    These  datas are common across the components .
    I kmow by putting the data inside the
    component name="DynZMM33">
          <component-config>
            <property name="ClassName" value="DynZMM33"/>
            <property name="SecurityZone" value="DynZMM33/high_safety"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/DynJspZMM33.jsp"/>
          </component-config>
    <component-profile>
       <property name="UserID" value="userid"/>
       <property name="password" value="password"/>
    </component-profile>
    </component>
    this becoms component specific ... which I can retriev the by using
    String ClientVal = request.getComponentContext().getProfile().getProperty("Client");
    in doContent()  method ..
    But this way i have to specify these properties in all the component.. which is repetetive in nature.
    I would rather put it in common location and want to retrieve the info from the portalapp.xml...
    How to achieve this
    I am using "AbstractPortalComponent"  .
    thanks
    pkiran

    Hi Prashanth,
    see Reading another iView's profile personalized values and Validate PCD URI
    Anyhow, maybe you should implement a service which returns the values (from the service profile). This would be more clean for accessing global values.
    Hope it helps
    Detlev

  • HT200197 hi i just bought an Apple TV device and tried setting up the wireless but after i enter the 2WIRE  Key Password the screen starts by saying connecting than the screen says Activating below says stting date & times and just sits there for an hour

    Hi I just bought an Apple TV device i have detected the 2WIRE and entered the Product Key Password.  It takes that okay the screen goes to Connecting followed by Activating below in small print it says Setting date and time but nevr leaves that screen it just clocks there for evr???

    Welcome to the Apple Community.
    Assuming this is not the first time you have used your Apple TV
    You might try restarting the Apple TV by removing ALL the cables for 30 seconds.
    Also try restarting the router. (Also try removing it’s power cord for at least 30 seconds)
    If the problem persists, try a restore, you may want to try the previous procedures several times before doing this.
    If restoring from the Apple TV doesn't help, try restoring from iTunes using a USB cable.
    If this is a new Apple TV, in addition to trying the above, it may also be that your network router is not allowing access to the timeserver, check that your router allows access over port 123.

  • When browsing my artists in iTunes, why is there multiple Various Artists?

    I am in the process of organizing my iTunes, and came across a problem.
    Under the artists tab of iTunes 11 I have two different options for my Various Artists (i.e. Soundracks and complilations). I tried to see if there was a difference in any of the other fields that would cause a split, but can't find any.
    Is there a way to merge the two? So all of my soundtracks are in the same place?

    It is hard to assess the situation without sitting at your computer and having a look myself.  First, if you're seeing space savings I doubt all your files are a compressed format.  Frequently if you try compressing a compressed format file such as AAC (don't confuse with AIFF) you will actually find the file gets larger because there is overhead to compression and if it cannot compress any more then you end up just adding overhead on top of no savings.  Second, normally if you zip the iTunes library it would basically make it inaccessible to iTunes and iTunes would make you a brand new library or at least flag all your tracks as missing (as you are seeing ain part).
    I don't know what computer you are running, which operating system, which version of iTunes.  Unless they have done something radical in Lion in terms of letting you zip your iTunes folder and still have it functional, you either didn't zip the whole thing, or... I don't know.  One scenario is that somehow your media have been split up and you have them in several locations.  One isn't really part of your library except for 80 tracks, so when you compressed it (and I still am puzzled by the compression unless it was AIFF files you were no longer using), it didn't really make much difference to the playability.  Then you have an untouched library elsewhere.
    Use the Reveal In Finder command to see where some of those problem files are located vs. where the playable files are located.

Maybe you are looking for