Guest User

Untitled

a guest
Mar 1st, 2012
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. That's the error i get when parsing and convertin string to date:
  2. "when converting a string to datetime, parse the string to take the date before putting each variable"
  3.  
  4. [DataMember(Name="date")]
  5.        public string formattedEventDate {
  6.            get {
  7.                return String.Format("{0:f}", eventDateTime); }
  8.            set {
  9.                DateTime p = DateTime.Parse(value);
  10.  //              DateTime parsed = DateTime.ParseExact(value, "yyyy-MM-dd HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture);
  11.                eventDateTime = p;
  12.            }
  13.        }
  14.        public DateTime eventDateTime {get;set;}
Advertisement
Add Comment
Please, Sign In to add comment