Click here to Skip to main content
16,012,198 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am working on C#.net 3.5 web project and want to fetch an inbox message and wall message of my own account with date and time.
I am able to fetch an inbox message and wall message but it does not give date and time.
I am using following code:-
string gettingPost = api.Fql.Query("SELECT message, created_time  FROM stream WHERE source_id =userId ");

This line returns all the wall messages and it returns created_time value = 1279173603.
What is this? I do not understand.
Please reply...if there are any solutions.

Thanks
Posted
Updated 22-Jul-10 21:26pm
v2

I guess you are using some API for this. It would be better if you post it on their discussion forum[^].
 
Share this answer
 
"This line returns all the wall messages and it returns created_time value = 1279173603."

This looks like a numeric time value (in seconds). I think you can convert it to a C# DateTime (100 nanosecond ticks) by using the constructor DateTime(Int64) using the above value multiplied by 10,000,000 (TimeSpan.TicksPerSecond).

[edit]You will also need to add 1969 to the year (see DateTime.AddYears()) as the time value above is based on 1 January 1970 and the DateTime structure is based on 1 January 0001.[/edit]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900