PC Review


Reply
 
 
=?Utf-8?B?QXJuZSBHYXJ2YW5kZXI=?=
Guest
Posts: n/a
 
      4th Apr 2006
How can I get the difference in minutes between DateTime.Now and
DateTime.UtcNow?

--
Arne Garvander
Certified Geek

 
Reply With Quote
 
 
 
 
Markus Stoeger
Guest
Posts: n/a
 
      4th Apr 2006
Arne Garvander wrote:
> How can I get the difference in minutes between DateTime.Now and
> DateTime.UtcNow?


... something like:

DateTime now = DateTime.Now;
TimeSpan dt = now - now.ToUniversalTime();

Console.Out.WriteLine(dt.TotalMinutes);

hth?
Max
 
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
Millisecond values missing when inserting datetime into datetime column of sql Server Manikandan Microsoft C# .NET 4 18th Jul 2007 09:59 PM
How can I save a DateTime from my C# program into a SQL Server (datetime) database column. Steve Kershaw Microsoft ASP .NET 5 29th Aug 2006 04:10 AM
System.DateTime doesn't convert to SqlDbType.DateTime Narshe Microsoft C# .NET 3 2nd Nov 2005 06:42 PM
DateTime problem: how to create datetime format hh:mm:ss AM/PM without the date mimi Microsoft C# .NET 1 6th Aug 2004 09:28 PM
XML dateTime conversion to DateTime.MinValue accross timezones Symon R Microsoft Dot NET 0 6th Aug 2003 08:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:24 PM.