DelphiBasics
  Home  |  Delphi .net Home  |  System NameSpace
 .NET Framework
 Namespace References

 System
 
  Array  Class 
  Boolean  Structure 
  Buffer  Class 
  Byte  Structure 
  Char  Structure 
  Console  Class 
  Convert  Class 
  DateTime  Structure 
  DayOfWeek  Enumeration 
  Decimal  Structure 
  Double  Structure 
  Enum  Class 
  Environment  Class 
  Exception  Class 
  ICloneable  Interface 
  Int16  Structure 
  Int32  Structure 
  Int64  Structure 
  Math  Class 
  Object  Class 
  OperatingSystem  Class 
  Random  Class 
  SByte  Structure 
  Single  Structure 
  String  Class 
  TimeSpan  Structure 
  UInt16  Structure 
  UInt32  Structure 
  UInt64  Structure 
  Version  Class 
 System.Collections
 System.Globalization
 System.IO

 Articles and Tutorials

 Overview of .NET
 Delphi and .NET
 Winform Applications
 ASP .Net Applications
 ASP Web Services
 Framework Collections
 Framework String Handling
 Framework Files and Folders

 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 

 
 
  System.TimeSpan Structure
 
 Description
Calling writeTextBlock The TimeSpan holds a time span in days, hours, minutes, seconds and milliseconds. Unlike DateTime, which is a point in time, TimeSpan is an elapsed period of time. For example, two and a half hours.
 
Internally, the elapsed time is in terms of a number of elemental ticks (0.0000001 seconds).
 
It can be used in arithmetic on DateTime values, for example, by adding a TimeSpan value to a point in time, or as the result of the difference between two dates. After writeTextBlock
 Syntax
Constructor Create ( Ticks : Long );
Constructor Create ( Hours : Integer; Minutes : Integer; Seconds : Integer );
Constructor Create ( Days : Integer; Hours : Integer; Minutes : Integer; Seconds : Integer );
Constructor Create ( Days : Integer; Hours : Integer; Minutes : Integer; Seconds : Integer; Milliseconds : Integer );
 Methods
Add  Adds a timespan to the current timespan
Compare  Compares twoTimeSpan values
CompareTo  Compares the current TimeSpan value to another
Duration  Returns the absolute value of the current TimeSpan
Equals  Returns true if TimeSpan values are exactly the same
FromDays  Creates a TimeSpan value from a given number of days
FromHours  Creates a TimeSpan value from a given number of hours
FromMilliseconds  Creates a TimeSpan value from a given number of milliseconds
FromMinutes  Creates a TimeSpan value from a given number of minutes
FromSeconds  Creates a TimeSpan value from a given number of seconds
FromTicks  Creates a TimeSpan value from a given number of ticks
Negate  Negates the current TimeSpan value
Parse  Converts a string representation of time span into a TimeSpan value
Subtract  Subtracts a TimeSpan from the current TimeSpan
ToString  Converts a TimeSpan value into a string

 Fields
MinValue  Int64  Minimum number of ticks : -9,223,372,036,854,775,808
MaxValue  Int64  Maximum number of ticks : 9,223,372,036,854,775,807
TicksPerDay  Int64  Constant number of ticks in a day : 864,000,000,000
TicksPerHour  Int64  Constant number of ticks in an hour : 36,000,000,000
TicksPerMinute  Int64  Constant number of ticks in a minute : 600,000,000
TicksPerSecond  Int64  Constant number of ticks in a second : 10,000,000
TicksPerMillisecond  Int64  Constant number of ticks in a millisecond : 10,000
Zero  TimeSpan  0 value time span : 0 ticks
 Properties
Days  Integer  Days component
Hours  Integer  Hours component
Minutes  Integer  Minutes component
Seconds  Integer  Seconds component
Milliseconds  Integer  Milliseconds component
Ticks  Int64  Ticks component
TotalDays  Double  Timespan expressed as days and part days
TotalHours  Double  Timespan expressed as hours and part hours
TotalMinutes  Double  Timespan expressed as minutes and part minutes
TotalSeconds  Double  Timespan expressed as seconds and part seconds
TotalMilliseconds  Double  Timespan expressed as milliseconds and part milliseconds
 Operators
+  Adds a specified time interval to a specified date and time or time span.
=  Determines whether two specified instances of TimeSpan are equal.
>  Determines whether one specified TimeSpan is greater than another specified TimeSpan.
>=  Determines whether one specified TimeSpan is greater than or equal to another specified TimeSpan.
<>  Determines whether two specified instances of TimeSpan are not equal.
<  Determines whether one specified TimeSpan is less than another specified TimeSpan.
<=  Determines whether one specified TimeSpan is less than or equal to another specified TimeSpan.
-  Subtracts a specified TimeSpan from a specified TimeSpan or DateTime. Also negates a TimeSpan value (unary operator).

 Microsoft MSDN links
 
System
System.TimeSpan
 
Delphi Programming Neil Moffatt 2002 - 2016. All rights reserved.  |  Home Page