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

Similar Messages

  • 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

  • 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

  • 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

  • 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 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>

  • 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

  • External content based SharePoint list date/time information wrong

    So, we have a SQL Server database that contains date/time type data.
    When we look at the info in the database, the date and times appear to be in GMT, which is 5 hours before our time.
    So, we set up views with a DATEADD calculation to compensate for the difference. When we use the view, the dates and times match our timezone info.
    We then set up an external content to our view.
    When the data is displayed in rows and columns, we see times that are 10 hours before GMT.
    We had put in the dateadd calculations because when we had scripts that grabbed the data from SQL Server and put them into text files, the dates and times were all 5 hours off.
    Is there code within the External data connectors (or SharePoint itself) which compensate for the time zones?
    Thanks!

    Hi Iwvirden,
    When you create an External Content Type and External List using the SharePoint Designer, DateTime fields are normalized to UTC using the NormalizeDateTimesetting
    associated with the TypeDescriptor for the DateTime field. This leads to the date field wrong in Business
    Connectivity Services.
    To fix this issue, you can change the normalization to use local time as follows:
    <TypeDescriptor TypeName="System.DateTime"
    Name="DueDate" DefaultDisplayName="Due Date">
    <Interpretation>
    <NormalizeDateTime LobDateTimeMode="Local" />
    </Interpretation>
    </TypeDescriptor>
    Here is a similar thread for your reference:
    Timestamp in Sharepoint external content type not matching value in SQL table
    Here is a detailed article for your reference:
    Why are my date fields wrong in Business Connectivity Services?
    Best Regards
    Zhengyu Guo
    TechNet Community Support

  • 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

  • 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?

  • Convert field value from Double to Date Time.

    Hi Every one.  Its been a long time since i have last posted on this site but i need some help again please.
    I want to convert a field value (saved as format double) to a date time value. I dont seem to find a function
    that can do this can anyone give me some help please?
    A sample would be to convert 40249.6588697106 to the format of Date Time being 12/03/2010 15:48:46
    Any suggestion?
    Thanks

    You can define a date time variable and use CDateTime.
    dim d as DateTime
    d = CDateTime(40179.55833333)
    formula = d

  • Using COUNTIF on time values in pop-up menu (employee schedule template)

    I have modified the Numbers employee schedule template to my liking and it works very well. I would like to add a column to the beginning which shows, at a glance, how many people I have scheduled for AM shifts and PM shifts on a given day. My AM shifts start at 9:00 AM and my PM shifts end at 6:30 or 8:30 PM.
    So I thought I could use COUNTIF, but after I set the array, I cannot get the condition right to return anything except "0". How do you make it detect the appropriate times? The times in each cell for In and Out times are selected using a pop-up menu, just like the template.
    Here is what I tried: =COUNTIF(E3:AE3,"9:00 AM")
    What should the condition be to return a proper count?

    ac,
    You shouldn't feel badly about having trouble with this template. It is a rather tricky one. The values in the Pop-Up menus are Date/Time values. That is to say, they have year, month, day, hour and minute components, even if only the hours and minutes are displayed. So if you only compare to the hours and minutes, you will never get a match.
    I don't know if you have experienced this yet, but when you changed the Pop-Up menu content, you probably entered the current year, month and day unknowingly and will have trouble doing math against the Pop-Up content that was originally in the template.
    My suggestion in your case would be to convert the time references to decimal hours before doing a comparison. For instance, if the time you wish to compare to is in cell C4, you could extract the decimal hours with =HOUR(C4)+MINUTE(C4)/60
    Remember that the hours will reflect a 24-hour day, so times in the afternoon will run from 12.0 to 23.99...
    Then after converting to decimal, instead of using "9:00 AM" for the COUNTIF criteria, use 9.
    There are probably ways to do this using the Duration format as well, but I prefer the decimal hours.
    Hope this helps.
    Jerry

  • How convert date/time from xml in xdp(Designer)?

    Hi, i want to convert date/time format from xml in Designer, date/time value in xml is NOT in common format YYYY-MM-DD (if is in a common format i can do this with pattern)
    I have a "DateTime" Field in Xdp can get from Xml date and time:
    In XML <DateTime>DD-MM-YYYY</DateTime> i want to convert in XDP in DateTime Field in "DD-April-YYYY"
    Can i do this?

    You can do this way..
    Bind the date field to your XML tag.
    Set the display pattern for the date field.
    In the initialize event of the date field place the following code.
    Set JavaScript as language.
    var dtStr = this.rawValue;
    var pos1=dtStr.indexOf("-");
    var pos2=dtStr.indexOf("-",pos1+1);
    var strMonth=dtStr.substring(0,pos1);
    var strDay=dtStr.substring(pos1+1,pos2);
    var strYear=dtStr.substring(pos2+1);
    //Assign the formatted value to the Date field.
    this.rawValue = strYear + "-" + strMonth + "-" + strDay;
    Thanks
    Srini

  • What you wanted to know about Time values

    Hello
    I tried to gather in a single document the useful infos about the use of time values in Numbers.
    I must thanks pw1840 which checked the English syntax.
    Here is the text only document.
    Files with the sample tables are available on my iDisk:
    <http://idisk.me.com/koenigyvan-Public?view=web>
    Download:
    ForiWork:ForNumbers:Time in Numbers.zip
    *STORED DATE-TIME VALUES - BASICS*
    Numbers clearly states that it stores date-time values, no less no more. This means these values consist of two parts: a date and a time. It is important to note that both parts are present even if only one of them is displayed.
    When we type the time portion only, it includes the current date even though it may not be displayed.
    But when we apply the formula: =TIME(0,0,ROUND(TIMEVALUE(B)24*6060,0)), we get a date-time value whose numerical value of the date portion is 0. This means, in AppleLand, 1 janvier 1904. Such a date-time allows us to make correct calculations, but there are two true drawbacks:
    1) Since TIMEVALUE() returns a decimal number, when we calculate the corresponding number of seconds we MUST use the ROUND() function. While calculations with decimal numbers give the wanted value, they may not be exact and be off by + or - epsilon. And
    2) The structure of Numbers date-time values is such that the time part is always in the range 0:00:00 thru 23:59:59.
    There is also a detail which seems annoying to some users. The minimal time unit is the second because time values are in fact a pseudo string representing the number of seconds between the date-time and the base date-time, 1 janvier 1904 00:00:00.
    -+-+-+-+-
    *TIMEVALUE() FUNCTION*
    When Numbers Help states that the TIMEVALUE() function "converts a date, a time, or a text string to a decimal fraction of a 24-hour day.", it means that the operand for the function TIMEVALUE() may be something like:
    31/12/1943, 31 décembre 1943, or 31 déc. 1943 described as a date;
    1:12:36 or 1:12 described as time; or
    31/12/1943 23:59:59 described as a text string.
    The date may also be 31/12/43 but here the program must guess the century. According to the rule, this one will be 31/12/2043 (yes, I am very young).
    All of this is not exactly what we are accustomed to but it is perfectly logical as described. My guess is that those who don't understand are simply clinging to old habits and are reluctant to adopt an unfamiliar approach .
    -+-+-+-+-
    *ELAPSED TIME (DURATION)*
    Given a table whose 1st row is a header, I will assume that column B stores starting-time values and column C stores ending-time values. Both do not display the date component of the date-time values. We may get the difference in column D with the formula:
    =IF(OR(ISBLANK(B),ISBLANK(C)),"",TIMEVALUE(C)-TIMEVALUE(B))
    which returns the elapsed time as the decimal part of the day.
    We immediately encounter a problem. If ending-time is the day after the starting-day, the result will be negative. So it would be useful to revise the formula this way:
    =IF(OR(ISBLANK(B),ISBLANK(C)),"",IF(TIMEVALUE(C)>TIMEVALUE(B),0,1)+TIMEVALUE(C) -TIMEVALUE(B))
    But some of us may wish to see results in the traditional format which may be achieved using:
    =IF(OR(ISBLANK(B),ISBLANK(C)),"",TIME(0,0,ROUND((IF(TIMEVALUE(C)>TIMEVALUE(B),0 ,1)+TIMEVALUE(C)-TIMEVALUE(B))24*6060,0)))
    -+-+-+-+-
    *DURATION SUMS > or = 24 HOURS*
    In the examples above, we always assumed that the durations where smaller than 24 hours because Numbers states clearly in the Help and the PDF Users Guide that time values are restricted to the range 00:00:0 to 23:59:59. For longer durations we must fool Numbers.
    First problem: we are adding several time durations. Each duration is in the authorized range and the result is greater than 24 hours.
    As before, starting-time values are in column B, ending-time ones are in column C, and the elapsed time value is in column D. The formula is:
    =IF(OR(ISBLANK(B),ISBLANK(C)),"",IF(TIMEVALUE(C)>TIMEVALUE(B),0,1)+TIMEVALUE(C) -TIMEVALUE(B))
    in column E, the formula for the cumulative elapsed time value is:
    =SUM($D$2:D2)
    in column F, converting to time format, the formula is:
    =TIME(0,0,ROUND(MOD(E,1)24*6060,0))
    in column G, the formula for showing more than 24 hours in the day/hour/minute format is:
    =IF(E<1,"",INT(E)&IF(E<2," day "," days "))&F
    in column H, expressing total elapsed time in total hours using the traditional time format, the formula is:
    =IF(E<1,F,INT(E)*24+LEFT(F,LEN(F)-6)&RIGHT(F,6))
    in column I, expressing total elapsed time in total hours using the traditional time format, an alternate formula is:
    =IF(E<1,F,INT(E)*24+HOUR(F)&":"&RIGHT("00"&MINUTE(F),2)&":"&RIGHT("00"&SECOND(F ),2))
    Of course the user would choose the format used in column G or the one in column I for his table. There is no need to keep all of them. It would be fine to hide column F whose contents are auxiliary.
    Second problem: individual durations may be greater than 23:59:59 hours.
    Again, column B is used to store starting date-time, column C stores ending date-time, and durations are calculated in column D. Since B and C are storing full date-time values, we may use this simple formula to find the duration:
    =C-B
    in column E, the time portion of the duration given in time format is:
    =TIME(0,0,ROUND(MOD(D,1)24*6060,0))
    in column F the formula to show the duration as days/hours/minutes is:
    =IF(D<1,"",INT(D)&IF(D<2," day "," day(s "))&E
    in column G we give the elapsed time in total hours using a time format. The formula is:
    =IF(D<1,E,INT(D)*24+LEFT(E,LEN(E)-6)&RIGHT(E,6))
    in column H we give the elapsed time in total hours using a time format. An alternate formula is:
    =IF(D<1,E,INT(D)*24+HOUR(E)&":"&RIGHT("00"&MINUTE(E),2)&":"&RIGHT("00"&SECOND(E ),2))
    If the duration is greater than 24 hours, the results in columns E and F are not a time value but a string. So the value in column D (which is time duration only) is useful.
    -+-+-+-+-
    *PROBLEM WITH ENTERING TIME*
    When you wish to enter 12:34 but 12 is the number of minutes, remember that Numbers will decipher this as 12 hours and 34 minutes. Simple tip:
    Assuming that your original entry is in column B, then in column C use this formula to align the minutes and seconds for proper Numbers interpretation:
    =IF(ISERROR(TIME(0,LEFT(B,SEARCH(":",B)-1),RIGHT(B,LEN(B)-SEARCH(":",B)))),"",T IME(0,LEFT(B,SEARCH(":",B)-1),RIGHT(B,LEN(B)-SEARCH(":",B))))
    -+-+-+-
    *MISCELLANEOUS NOTES*
    • Of course, the addition of two dates and multiplication or a division applied to one date means nothing and would generate the red triangle announcing a syntax error.
    • We may add a time value to a date-time: If B contains a date-time and C contains a time, the following formula will return the sum of the two values:
    =B+TIMEVALUE(C)
    • We may strip the time value of a full date-time one with the formula: =DATE(YEAR(B),MONTH(B),DAY(B))
    • Just as a reminder,
    =EDATE(B, 3) adds 3 months to the pure date stored in B
    so, of course,
    =EDATE(B, 12) adds one year to the pure date stored in B
    • If B and C store date-time values,
    =C-B returns the difference in decimal days.
    =DATEDIF(B,C,"D") returns the number of days between the two pure dates. It's identical to =DATE(YEAR(C),MONTH(C),DAY(C))-DATE(YEAR(B),MONTH(B),DAY(B))
    =DATEDIF(B,C,"M") returns the number of months between the two pure dates.
    =DATEDIF(B,C,"Y") returns the number of years between the two pure dates.
    Three other variants are available which use the parameters "MD","YM" and "YD".
    Yvan KOENIG (from FRANCE lundi 25 août 2008 15:23:34)

    KOENIG Yvan wrote in his "*STORED DATE-TIME VALUES - BASICS*" section:
    The minimal time unit is the second because time values are in fact a pseudo string representing the number of seconds between the date-time and the base date-time, 1 janvier 1904 00:00:00.
    This is not exactly true. Numbers files store date-time values in a string format consistent with ISO 8601:2004. This format explicitly includes year, month, day, hour, minute, & second values.
    This may be verified by examining the uncompressed index.xml file in a Numbers package. For example, the first day of 1904 is stored as cell-date="1904-01-01T00:00:00+0000" & of the year 0001 as cell-date="0001-01-01T00:00:00+0000." This format is not a numeric value of seconds from a base date-time, often referred to as a "serial time" format, that is used in applications like AppleWorks (or Excel?).
    Note that the time value (all that follows the "T" in the string) actually has four components, the last one (following the plus) representing the time zone offset from UTC time in minutes. AFAIK, Numbers does not set this to anything besides "+0000" but interestingly, it will attempt to interpret it if set by manually editing the file. For example, change cell-date="1904-01-01T00:00:00+0000" to cell-date="1904-01-01T00:00:00+0120" & the cell will display the last day of December of 1903 as the date, but will still show the time as 00:00:00. This suggests a future version of Numbers might be time zone aware, but currently it is unreliable & not fully implemented.
    Anyway, Numbers does not use the first day of 1904 as a reference for stored date-time values, although it will add that date to "dateless" time values imported from AppleWorks spreadsheets. Although I have not verified this, I believe it will also seamlessly translate between ISO & serial time formats as needed for Excel imports & exports, using the first day of 1900 as needed.
    Some other things to note about the ISO standard:
    • It permits fractional time values in the smallest time unit present, so for example "T10:15:30" could be represented as "T10:15.5" but Numbers does not support this -- the cell will appear empty if the index file is manually edited this way.
    • It does not stipulate whether date-time values represent intervals or durations (although it includes an explicit format for intervals between any two date-time values, known as a period). This means a future version of Numbers could support durations without the addition of a new data storage type, but legacy & import/export issues could make this too impractical to implement.
    • It supports a variety of other formats, including date-only, time-only, day-of-year, week-of-year, & various truncations (just hours & minutes, for example). All are unambiguous so a future version of Numbers could support them, but files generated with those versions would not be backwards compatible with the current version.
    For completeness, I will add that instead of using complex formulas to manipulate single-cell date-time values in Numbers, it is sometimes more straightforward to use multiple cells, one for each unit of time (for example, days, hours, minutes, & seconds), plus simple arithmetic formulas to combine them. Since each unit is a simple number, this results in highly portable, accurate, & "future-proof" tables, especially for durations. This is particularly useful for multimedia work in which the units might include video or film frames or audio samples.

  • UPDATE SQL query using WHERE and a date/time data type... Multiple changes...

    I'm using the LabView Database Connectivity Toolset and am using the following query...
    UPDATE IndexStation
    SET Signal_Size=200
    WHERE 'StartTime=12:05:23'
    Now the problem is that this command seems to update all rows in the table IndexStation... Not just specifically the row where StartTime=12:05:23
    I have tries all sorts of {} [] / ' " around certain characters and column names but it always seems to update all rows...
    I've begun to use the SQL query tab in Access to try and narrow down as to why this happens, but no luck!
    Any ideas!?
    Thanks,
    Chris.

    Chris Walter wrote:
    I completely agree about the Microsoft issue.
    But it seems no SQL based manual states that { } will provide a Date/Time constant.
    Is this an NI only implementation? Because I can't seem to get it to function correctly within LabView or in any SQL query.
    Chris.
    There is nothing about the database toolkit in terms of SQL syntax that would be NI specific. The database Toolkit simply interfaces to MS ADO/DAO and the actual SQL syntax is usually implemented in the database driver or database itself although I wouldn't be surprised if ADO/DAO does at times munch a bit with that too.
    The Database Toolkit definitely does not. So this might be a documentation error indeed. My understanding of SQL syntax is in fact rather limited so not sure which databases might use what delimiters to format date/time values. I know that SQL Server is rather tricky thanks to MS catering for the local date/time format in all their tools and the so called universal date/time format has borked on me on several occasions.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for

  • Upgrade weblogic10.3.2 to 10.3.5., error in discover using central site

    Hi, I have installed weblogic 10.3.2 in my host, created domain, and discovered them in central site.then I used upgrade installer to upgrade weblogic server to 10.3.5, in Adminserver Console, I can see the version changed to 10.3.5, but in EM centra

  • How do I rotate a video 90 degrees with premiere elements 9?

    I shot a birthday video of the neighbors 5 year old with my Canon T2i camera.  Had to turn the camera on its side to get everything in the shot.  I can view the video right side up in the canon software but can not make the change permanent so the ne

  • Lost Mail Sounds

    Mail no longer makes any sounds on new mail or sending. New Mail & Sent Mail sounds are turned on in the Settings area. I upgraded to 6.0, any connection? Thanks.

  • Mouse keeps sticking

    my mouse is sticking mor and more frequently, never used to do that! I have to unplug it for a few secs then when plugged backin it's ok for a few mins. optical mouse plugged into keyboard usb socket mouse is intel generic (cheap) thanks in anticipat

  • Bio Admin Password

    I'd like to request the bios administrator password. System disabled code is 63919717. Any help is appreciated. Thanks! This question was solved. View Solution.