?
Solved

Converting serialized dates using c#

Posted on 2012-03-30
4
Medium Priority
?
265 Views
Last Modified: 2012-03-30
Hi All,

For example, I have a serialized date as the following integer 1109808000000 which actually works out to be March 5th 2005...

Could anyone suggest how I can convert this serialized date to display as its human readable form using c#?

Many thanks,

Rit
0
Comment
Question by:rito1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
ingriT earned 1000 total points
ID: 37786350
Have you tried this http://stackoverflow.com/questions/6554407/deserialize-date1309498021672-in-to-datetime?

var serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
string json = "\"\\/Date(1309498021672)\\/\"";
DateTime date = serializer.Deserialize<DateTime>(json);
// date is 7/1/2011 5:27:01 AM

Open in new window

0
 
LVL 6

Expert Comment

by:ingriT
ID: 37786369
And if you're using .NET 4.0 and you don't have System.Web.Script.Serialization.JavaScriptSerializer(); available, set the Target framework in your project properties to ".NET Framework 4" and not the Client framework and then add the System.Web.Exetensions dll as a reference.
0
 
LVL 6

Assisted Solution

by:kswathi
kswathi earned 1000 total points
ID: 37786374
If you are using Pr time

Check the below link hope it helps

http://stackoverflow.com/questions/56638/how-to-convert-from-prtime-to-net-datetime
0
 
LVL 1

Author Closing Comment

by:rito1
ID: 37786382
Excellent thanks, that gives me food for thought.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question