[英]In LINQ to SQL, How to return datetime in ISO 8601 String, IETF String or timestamp?
In LINQ to SQL , how can I convert this format: "VDate(1253451600000+0200)V" to an ISO 8601 string, IETF string or timestamp format? 在LINQ to SQL中 ,如何将这种格式: “ VDate(1253451600000 + 0200)V”转换为ISO 8601字符串,IETF字符串或时间戳格式?
I'm using WCF JSON-Enabled and Ajax-Enabled web service. 我正在使用WCF启用JSON和启用Ajax的Web服务。
Run it through a DataContractJsonSerializer 通过DataContractJsonSerializer运行它
ms = new MemoryStream(Encoding.Unicode.GetBytes(json));
ser = new DataContractJsonSerializer(typeof(DateTime));
DateTime dt = ser.ReadObject(ms) as DateTime;
ms.Close();
Now, using this DateTime, do whatever you wish! 现在,使用此DateTime,做任何您想做的事!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.