Solved

CAML to C#? CreateISO8601DateTimeFromSystemDateTime?

Posted on 2010-11-18
1
1,336 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

696 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