XMLConvert Obsolete DateTime methods

I've converted my application to VS2008 and now I have the folowing warning.

'System.Xml.XmlConvert.ToDateTime(string)' is obsolete: 'Use 
XmlConvert.ToDateTime() that takes in XmlDateTimeSerializationMode'

'System.Xml.XmlConvert.ToString(System.DateTime)' is obsolete: 'Use 
XmlConvert.ToString() that takes in XmlDateTimeSerializationMode'

The problem is that I cannot determine which XmlDateTimeSerializationMode I 
need to pick.  I've searched a lot but was not able to figure out which to 
pick (Local, Utc, Unspecified, RoundtripKind).  I've even use the Reflector 
to check what  going on under the hood.

Help!

-- 
Stephane Guerin

0
9/25/2009 11:32:01 AM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies
1310 Views

Similar Articles

[PageSpeed] 7

Reply:

Similar Artilces:

Types of Styles and Methods of Changing Style
A style beginner is confused by the terminology. Trying to understand the differences in "style" types: global, all styles, user defined styles, styles in use and available styles. And maybe there are others. Plus, what appears in the style window in the Formatting Toolbar does not match up with what is presented in the style list in the Formatting Palette or in the Style window under Format/Style. Is there a place to go in Word Help or online to understand this? I haven't found it yet. BTW, I'm using Word 2008. Thanks for any tips. Hi Norm, <br...

datetime to datetime offset
We are in the process of upgrading our systems entirely. Making huge changes to the hardware and software. One change is going from SQL Server 2000 to 2008. 2008 has the new datetimeoffset data type, which for us could be a God-send. In reading online however, it seems that the date time is always passed in as a string. Is there no function that allows us to pass in a datetime and an offset or do we actually have to do as I have seen all over the the Internet and convert our dateTime values to a string, then concatonate the offset and pass it in that way? If we DON'T ...

ODMA obsolete? #2
Is ODMA (Open Document Management API) obsolete? ...

XmlConvert.ToDateTime question
I have a question and I think I know the answer, but I am looking for confirmation (and maybe a link to some documentation) I have an input string of: "2004-08-01T00:00:00-00:00" When I pass this to XmlConvert.ToDateTime I get a result of "7/31/2004 8:00:00 PM" Can anyone clarify why the result is one day in the past? By thought is because of the "-00:00" in the input string, but I am not sure why this is the cause. Thanks Shawn The DateTime class in the .NET Framework has no way of storing time zone information. This means the DateTime instanc...

XmlConvert and Object type
I'm looking for a way to retrieve data via System.Reflection.FieldInfo.GetValue (which returns an Object) and convert it to XML using XmlConvert.ToString. XmlConvert accepts only specified data types, so I could have a big ugly branching Select statement to call the correct ToString overload... but there must be an easier way. Any suggestions? Cheers, Jon XmlConvert cannot convert any arbitrary object to XML. For that you need the XmlSerializer: YourObjectType t = ... XmlSerializer s = new XmlSerializer(typeof(YourObjectType)); s.Serialize(Console.Out, t); This will g...

Obsolete Folders
My predecessor left without removing/changing over Outlook. I now have my folders as well as hers. I can collapse hers and it isn't a huge problem; but I would like to remove them altogether. Is there a way to do this? Thank you Version of Outlook? Type of mail account? In general, you can set your folder set as the default delivery location via File-> Data File Management... or Tools-> Account Settings... After that restart Outlook and use the same dialogs to remove the old folder set. Again; Exact details depend highly on your version of Outlook and type of ...

Retrieve Method
Hi I tried using the retrieve method in the SDK to retrive all incidents for an account. I am not able to retrieve the title of the case using the retrieve method. Any help is appreciated. Tina Are you passing the right XML with the columnset for the method? Try: string cols = "<columnset>"; cols += ""; //other fields who you want retrieve cols += "<column>title</column>"; cols += "</columnset>"; See http://msdn.microsoft.com/library/en-us/CrmSdk1_2/htm/Schema/incident.xml for more deitails. []'s Vin´┐Żcius Pitta Lima ...

Format DATETIME to Date in query on linked table
Access 2007 hitting an Oracle Database with MS ODBC Drivers for Oracle V 10.x I am pulling data from a linked Oracle table that contains a datetime field, [ENTRY_DATETIME]. It is one of the fields I pull as part of a make table query. I would like the data written to the new table (Step_1) to be a Date field with the short date format. Is there a way to format the data I write to the new table as a date? This: "Select..., Format([XXXX_XXXX.ENTRY_DATETIME],"mm/dd/yyyy") AS ENTRY_DATETIME ... into Step_1 from ....." Exports it as text. I'm prett...

Comparing DateTime ?
i want to compare 2 DateTime. I use mktime and difftime for comparing. If I compare 2 DateTime of same year it works fine but if both dates are from different year , I get a wrong result. any idea ? >i want to compare 2 DateTime. I use mktime and difftime for comparing. > >If I compare 2 DateTime of same year it works fine but if both dates >are from different year , I get a wrong result. Wrong - how? Give us a short code snippet example of what you're doing, the values involved, and the results you're getting. Dave I get the date and time in the format ex : 10:45:4...

Std.Dev.methods NOT WORKING
I have to generate a standard deviation analysis of data, but none o the suggested methods are working for me, including: http://tushar-mehta.com/excel/charts/normal_distribution/index.htm. My data is as follows: Fixture # -- Measurement 1 -- 7/16 2 -- 1/16 3 -- 2/16 4 -- 1/16 5 -- 1/16 6 -- 1/16 7 -- 2/16 8 -- 4/16 9 -- 3/16 10 -- 0 11 -- 1/16 12 -- 6/16 13 ...

ODMA obsolete?
Is ODMA (Open Document Management API) obsolete? ...

Prevent ShowAllData Method from failing
Hi, I have an Excel 2007 worksheet that has autofilters and macros assigned to option buttons in a Group Box that carry out some of the filtering. One button is the ShowAllData button that removes the filter. If the ShowAllData button is selected and then selected again (before any other button in the group is selected) I get a Run Time Error that the ShowAllData method of worksheet class failed. How do I prevent this error? I'm very new to VB. The code below is what I'm having trouble with. Thanks, Jim Sub UnhideBlanks() ' ' UnhideBlanks Macro ' ...

Object.Retrieve methods for CRM business objects
Hi, I am coding up some work currently, and have a relatively simple question relating to the .Retrieve method of the CRM business objects, such as CRMQuote. I am trying to manipulate the data contained in the CRMQuote entity, and the simplest way is for me to read the xml string returned by the retrieve method into a dataset. The problem that I am facing is that I require that all of the columns are returned for the entity. The SDK suggests this is possible by simply passing a blank string or null paramater to the Retrieve method {from the SDK} -- Public Function Retrieve( ByVal Call...

XslTransform object, Transform method
Of all the eight overloaded Transform methods in XslTransform, none of them write to a string. (They write to streams, readers, files, etc.) Anyone know how to get this to a string? xmlDoc.LoadXml(xml_string) xslDoc.Load(xsl_path) xslDoc.Transform(xmlDoc, Nothing, ???) How can I get the transformed result into a string? Thanks, Jon Jonathan Wolfson wrote: > Of all the eight overloaded Transform methods in XslTransform, none of > them write to a string. (They write to streams, readers, files, etc.) > Anyone know how to get this to a string? > > xmlDoc.LoadXml(xml_string) &...

C# DateTime -> XML DateTime
Is there a method available to convert a C# DateTime format to XML DateTime format? Thanks, Guy Have you looked at the XmlConvert class? --Dare -- This posting is provided "AS IS" with no warranties, and confers no rights. "Guy Dillen" <guy_dillen@hotmail.com> wrote in message news:3f5f632e$0$13863$ba620e4c@reader0.news.skynet.be... > Is there a method available to convert a C# DateTime format to XML DateTime > format? > > Thanks, > Guy > > yes i have looked at this lass, but does this also work in the direction C#->XML? "SQ...

purpose of XmlConvert.ToString() ???
HI, what is the purpose of XmlConvert.ToString() ? why not just use Convert.ToString() ? e.g. Int32 vInt32 = -2147483648; string s1 = XmlConvert.ToString(vInt32); string s2 = Convert.ToString(vInt32); s1 and s2 result in the same string. so what is the added benefit ? thnx Chris Chris <christianc@pandora.be> wrote: > what is the purpose of XmlConvert.ToString() ? > why not just use Convert.ToString() ? > > e.g. > Int32 vInt32 = -2147483648; > string s1 = XmlConvert.ToString(vInt32); > string s2 = Convert.ToString(vInt32); > > s...

runtime error 1004 method range of object '_global failed
I receive this error when i run this macro from Excel 2000 spanish version, but no when i run in english version? Public Function gf_CopyPasteData(s_range As String, s_range2 As String, i_start_sheet_index As Integer, i_end_sheet_index As Integer) As Integer 'copies data from sheet one sheet to another sheet If CInt(Range(s_range).Count) = CInt(Range(s_range2).Count) Then Sheets(i_start_sheet_index).Select Range(s_range).Select Selection.Copy Sheets(i_end_sheet_index).Select Range(s_range2).Select ActiveSheet.Paste 'valid...

xsd restriction on dateTime based on other dateTime
Hi All, i'm trying to define an xml schema for validation with a restriction on dateTime element based on another dateTime Element. in English: end (dateTime) should be greater than or equal to begin (dateTime) Is it possible to define such restrictions in XSD? regards Joris van Lier Joris van Lier wrote: > i'm trying to define an xml schema for validation with a restriction on > dateTime element based on another dateTime Element. > > in English: end (dateTime) should be greater than or equal to begin > (dateTime) > > Is it possible to define such rest...

unknown xslt function "format-dateTime"
Iam using Beta2 of VS2005 and getting the error "Error 4 'format-dateTime()' is an unknown XSLT function" at the following line: <xsl:value-of select="format-dateTime($pubDate,'[FNn] [D] [MNn] [Y] [h]:[m01] [PN]')" /> how can I get around this? > > Iam using Beta2 of VS2005 and getting the error "Error 4 'format-dateTime()' > > is an unknown XSLT function" at the following line: > > format-dateTime() is XPath2.0/XSLT2.0/XQuery1.0 function. VS2005 only > supports XPath1.0/XSLT 1.0. Use ms:format-date() exten...

Default datetime format
Hi. I want to set gatdate() as a default to a column of datatype datetime in sql server 2000 but in format DD/MM/YYYY. I have used (RIGHT('0' + RTRIM(DAY(GETDATE())), 2) + '/' + RIGHT('0' + RTRIM(MONTH(GETDATE())), 2) + '/' + RTRIM(YEAR(GETDATE()))) but this is not working properly. Regards, Muhammad Bilal If the column has data type datetime, then there is no need to convert the date to char. You can use something like this: DATEADD(day,DATEDIFF(day,0,CURRENT_TIMESTAMP),0) -- Gert-Jan Muhammad Bilal wrote: > > Hi...

OnDocOpened-like method?
Hi All, I'm in a real pickle trying to figure this one out. I want to know when a file has been opened successfully. In my app, files can either be loaded from the menu bar (File|Open or MRU), or they are opened programmatically by calling OpenDocumentFile. I want to be able to step in to the creation process at the point when the document has loaded the child frame and the view has been created. The second of these two cases is easy - I'm calling OpenDocumentFile, so when it returns, I'm at the point that I want to be. But what about when the user has opened the file manu...

line method question
How do you specify the thickness in line method? Thanks. This is my code, Private Sub Detail1_Print(Cancel As Integer, PrintCount As Integer) Me.ScaleMode = 1 Me.ForeColor = 0 Me.Line (0.0458 * 1440, 0)-(0.0458 * 1440, 14400) end sub May I know how I can modify it to set the borderwidth or thickness? Thanks. "Damian S" <DamianS@discussions.microsoft.com> wrote in message news:8A484A44-BA50-4953-A970-C31564331469@microsoft.com... > Hi, > > Use the BorderWidth property like this: > > Me.LINE_NAME.BorderWidth = 3 > > Damian. > > "00EricCl...

Obsolete references
I have a number of Word documents that have references to obsolete templates. In the Visual Basic window "Tools : References" I try to unselect the reference to the non-existent template but it won't let me saying it is in use. I'm not sure how it can be in use when it doesn't exist. Is there any way to remove these obsolete references. Thanks Fred ...

Where are the Begin... and End... Methods?
In several different forms of documentation that I've seen for calling a web service asynchronously in C# (and VS 2008), it says that the generated proxy should have a BeginXyz and EndXyz method for any exposed web method. In VS 2008 SP1, they aren't generated. Instead, there is a XyzAsync method that you use to make the call to the web method asynchronously and then your callback method is whatever method you set up to handle the XyzCompleted event. So, I do have the async call working, but why aren't the BeginXyz and EndXyz methods generated as indicated in several so...

How to purge obsolete common payees?
Hi, I am using M2007, and have accumulated a large number of obsolete payees in my checking account registry. In some cases, there are several which are similar enough to cause confusion when Money makes suggestions. Is there a way to purge all of the existing payee suggestion list? I found this once in M2004. -- Alan Account List | Categories and Payees | Payees then select and delete. If you have lots to do, it may take a while. This won't affect existing transactions. "Alan Biddle" <APBIDDLE@UNITED.NET> wrote in message news:ph5n835qcv9sgcjav0jr3c5rs8ri8hu6dg@...