PC Review


Reply
Thread Tools Rate Thread

converting Unix datetime count to .Net DateTime object

 
 
Mark Worrall
Guest
Posts: n/a
 
      4th Feb 2004
I am being supplied a count of number of seconds since Jan 1st 1970, i.e. a
Unix system time. How can I convert this into a valid .Net DateTime object ?

thanks,
Mark

WinXP / C#.Net 2003



 
Reply With Quote
 
 
 
 
Mattias Sjögren
Guest
Posts: n/a
 
      4th Feb 2004
Mark,

>I am being supplied a count of number of seconds since Jan 1st 1970, i.e. a
>Unix system time. How can I convert this into a valid .Net DateTime object ?


Get a DateTime value representing Jan 1st 1970, then call AddSeconds
on it.



Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help w/conversion to Unix Epoch DateTime in code Tony! Microsoft C# .NET 3 6th Apr 2009 01:40 AM
DateTime in unix format =?Utf-8?B?UGhpbGlwIFdhZ2VuYWFy?= Microsoft VB .NET 4 19th Aug 2005 08:44 PM
converting date string into datetime object Glenn M Microsoft VB .NET 1 21st Jul 2004 02:08 AM
converting Unix datetime count to .Net DateTime object Mark Worrall Microsoft Dot NET Framework 2 13th Feb 2004 05:52 PM
Re: converting Unix datetime count to .Net DateTime object Mark Worrall Microsoft C# .NET 1 4th Feb 2004 07:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:44 AM.