Serializing DateTime to time without milliseconds and gmt?

You could create a string property that does the translation to/from your timeField field and put the serialization attribute on that instead the the real DateTime property that the rest of the application uses.

– Espo Sep 19 '08 at 13:01 Espo: yes it will, see code in my answer :) – Matt Howells Sep 19 '08 at 13:12 That is how I solved it. Which I could accept both answers, but Jeffrey was first. The best I can do is an upvote :) – Espo Sep 19 '08 at 13:19.

Put XmlIgnore on the Time property. Then add a new property: XmlElement(DataType="string",ElementName="Time") public String TimeString { get { return this.timeField. ToString("yyyy-MM-dd"); } set { this.

TimeField = DateTime. ParseExact(value, "yyyy-MM-dd", CultureInfo. InvariantCulture); } }.

– Frederik Gheysels Sep 22 '09 at 10:27 Yes, Frederik is right. This won't work with a private method. If you make that method public it will serialize properly.

– Ryan Feb 12 '10 at 1:47.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions