Solved

CAML to C#? CreateISO8601DateTimeFromSystemDateTime?

Posted on 2010-11-18
1
1,319 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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.
These days socially coordinated efforts have turned into a critical requirement for enterprises.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

867 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

19 Experts available now in Live!

Get 1:1 Help Now