Solved

CAML to C#? CreateISO8601DateTimeFromSystemDateTime?

Posted on 2010-11-18
1
1,307 Views
Last Modified: 2012-05-10
Hi all,
I  will appreciate if somebody can provide C# that can replace this CAML query.

//In CAML this outputs date and time correctly. I need the C# code which can output same value.
CreateISO8601DateTimeFromSystemDateTime(StartTime)

//For reference the CAML query is as follows:
------------------------------------------------------------------------
                  <Geq>
                        <FieldRef Name='" + DateField + "'/>
                        <Value Type='DateTime'>" + Microsoft.SharePoint.Utilities.SPUtility.CreateISO8601DateTimeFromSystemDateTime(StartTime) + "</Value>
                  </Geq>
------------------------------------------------------------------------

Thanks in advance,
0
Comment
Question by:m_a_n
1 Comment
 
LVL 22

Accepted Solution

by:
p_davis earned 500 total points
ID: 34172516
it appears that using the s format will render an iso860 date

http://msdn.microsoft.com/en-us/library/az4se3k1%28VS.71%29.aspx
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now