Connecting Tech Pros Worldwide Help | Site Map

C# DateTime -> XML DateTime

  #1  
Old November 11th, 2005, 10:59 PM
Guy Dillen
Guest
 
Posts: n/a
Is there a method available to convert a C# DateTime format to XML DateTime
format?

Thanks,
Guy


  #2  
Old November 11th, 2005, 10:59 PM
SQL Server Development Team
Guest
 
Posts: n/a

re: C# DateTime -> XML DateTime


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...[color=blue]
> Is there a method available to convert a C# DateTime format to XML[/color]
DateTime[color=blue]
> format?
>
> Thanks,
> Guy
>
>[/color]


  #3  
Old November 11th, 2005, 10:59 PM
Guy Dillen
Guest
 
Posts: n/a

re: C# DateTime -> XML DateTime


yes i have looked at this lass, but does this also work in the direction
C#->XML?


"SQL Server Development Team" <sqldev@microsoft.com> wrote in message
news:eIggMg8dDHA.2368@TK2MSFTNGP09.phx.gbl...[color=blue]
> Have you looked at the XmlConvert class?
>
>
> --Dare
>
> --
> This posting is provided "AS IS" with no warranties, and confers no[/color]
rights.[color=blue]
>
>
> "Guy Dillen" <guy_dillen@hotmail.com> wrote in message
> news:3f5f632e$0$13863$ba620e4c@reader0.news.skynet .be...[color=green]
> > Is there a method available to convert a C# DateTime format to XML[/color]
> DateTime[color=green]
> > format?
> >
> > Thanks,
> > Guy
> >
> >[/color]
>
>[/color]


  #4  
Old November 11th, 2005, 11:00 PM
Oleg Tkachenko
Guest
 
Posts: n/a

re: C# DateTime -> XML DateTime


Guy Dillen wrote:
[color=blue]
> yes i have looked at this lass, but does this also work in the direction
> C#->XML?[/color]

All you need is myDateTime.ToString("s")

"s" means SortableDateTimePattern (based on ISO 8601), which is exactly what
Xml Schema DateTime format is based on.
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
xml, DateTime conversions and DateTime fields Andy B answers 2 September 25th, 2008 02:55 PM
XML datetime Jason Huang answers 2 May 2nd, 2007 08:25 AM
XML dateTime conversion to DateTime.MinValue accross timezones Symon R answers 0 November 22nd, 2005 02:06 AM
dateTime in Web Services Phil B answers 9 November 21st, 2005 12:11 PM
XML dateTime conversion to DateTime.MinValue accross timezones Symon R answers 0 July 19th, 2005 04:42 AM