GemBox.Spreadsheet
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    DateTimeGroup Struct

    Namespace:
    GemBox.Spreadsheet
    Assembly:
    GemBox.Spreadsheet.dll

    Represents a group of DateTimes.

    Each DateTime instance that has the same date/time components (year, month, day, hour, minute, second) as this DateTime up to Level belongs to this group.

    Instance of DateTimeGroup can be inserted into Values collection to enable filtering DateTime values.

    • C#
    • VB.NET
    public struct DateTimeGroup : IEquatable<DateTimeGroup>
    Public Structure DateTimeGroup
        Implements IEquatable(Of DateTimeGroup)
    Implements
    System.IEquatable<DateTimeGroup>

    Constructors

    DateTimeGroup(Int32)

    Initializes a new instance of the DateTimeGroup type with Year level.

    • C#
    • VB.NET
    public DateTimeGroup(int year)
    Public Sub New(year As Integer)
    Parameters
    year
    System.Int32

    The year.

    DateTimeGroup(Int32, Int32)

    Initializes a new instance of the DateTimeGroup type with Month level.

    • C#
    • VB.NET
    public DateTimeGroup(int year, int month)
    Public Sub New(year As Integer, month As Integer)
    Parameters
    year
    System.Int32

    The year.

    month
    System.Int32

    The month.

    DateTimeGroup(Int32, Int32, Int32)

    Initializes a new instance of the DateTimeGroup type with Day level.

    • C#
    • VB.NET
    public DateTimeGroup(int year, int month, int day)
    Public Sub New(year As Integer, month As Integer, day As Integer)
    Parameters
    year
    System.Int32

    The year.

    month
    System.Int32

    The month.

    day
    System.Int32

    The day.

    DateTimeGroup(Int32, Int32, Int32, Int32)

    Initializes a new instance of the DateTimeGroup type with Hour level.

    • C#
    • VB.NET
    public DateTimeGroup(int year, int month, int day, int hour)
    Public Sub New(year As Integer, month As Integer, day As Integer, hour As Integer)
    Parameters
    year
    System.Int32

    The year.

    month
    System.Int32

    The month.

    day
    System.Int32

    The day.

    hour
    System.Int32

    The hour.

    DateTimeGroup(Int32, Int32, Int32, Int32, Int32)

    Initializes a new instance of the DateTimeGroup type with Minute level.

    • C#
    • VB.NET
    public DateTimeGroup(int year, int month, int day, int hour, int minute)
    Public Sub New(year As Integer, month As Integer, day As Integer, hour As Integer, minute As Integer)
    Parameters
    year
    System.Int32

    The year.

    month
    System.Int32

    The month.

    day
    System.Int32

    The day.

    hour
    System.Int32

    The hour.

    minute
    System.Int32

    The minute.

    DateTimeGroup(Int32, Int32, Int32, Int32, Int32, Int32)

    Initializes a new instance of the DateTimeGroup type with Second level.

    • C#
    • VB.NET
    public DateTimeGroup(int year, int month, int day, int hour, int minute, int second)
    Public Sub New(year As Integer, month As Integer, day As Integer, hour As Integer, minute As Integer, second As Integer)
    Parameters
    year
    System.Int32

    The year.

    month
    System.Int32

    The month.

    day
    System.Int32

    The day.

    hour
    System.Int32

    The hour.

    minute
    System.Int32

    The minute.

    second
    System.Int32

    The second.

    Properties

    DateTime

    Gets the date/time of this DateTimeGroup.

    Valid date/time components are only those upon to Level.

    • C#
    • VB.NET
    public readonly DateTime DateTime { get; }
    Public ReadOnly Property DateTime As Date
    Property Value
    System.DateTime

    The date/time of this DateTimeGroup.

    Level

    Gets the grouping level of this DateTimeGroup.

    • C#
    • VB.NET
    public readonly DateTimeGroupLevel Level { get; }
    Public ReadOnly Property Level As DateTimeGroupLevel
    Property Value
    DateTimeGroupLevel

    The grouping level of this DateTimeGroup.

    Methods

    Equals(DateTimeGroup)

    Determines whether the other DateTimeGroup is equal to this DateTimeGroup instance.

    • C#
    • VB.NET
    public bool Equals(DateTimeGroup other)
    Public Function Equals(other As DateTimeGroup) As Boolean
    Parameters
    other
    DateTimeGroup

    The other DateTimeGroup to compare with this DateTimeGroup instance.

    Returns
    System.Boolean

    true if the other DateTimeGroup is equal to this DateTimeGroup instance; otherwise, false.

    Equals(Object)

    Determines whether the specified System.Object is equal to this DateTimeGroup instance.

    • C#
    • VB.NET
    public override bool Equals(object obj)
    Public Overrides Function Equals(obj As Object) As Boolean
    Parameters
    obj
    System.Object

    The System.Object to compare with this DateTimeGroup instance.

    Returns
    System.Boolean

    true if the specified System.Object is a DateTimeGroup and is equal to this DateTimeGroup instance; otherwise, false.

    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    Returns a hash code for this DateTimeGroup instance.

    • C#
    • VB.NET
    public override int GetHashCode()
    Public Overrides Function GetHashCode As Integer
    Returns
    System.Int32

    An integer value that specifies a hash value for this DateTimeGroup instance.

    Overrides
    System.ValueType.GetHashCode()

    ToString()

    Returns a System.String that represents this DateTimeGroup instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this DateTimeGroup instance.

    Overrides
    System.ValueType.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Operators

    Equality(DateTimeGroup, DateTimeGroup)

    Determines whether first and second DateTimeGroups are equal.

    • C#
    • VB.NET
    public static bool operator ==(DateTimeGroup first, DateTimeGroup second)
    Public Shared Operator =(first As DateTimeGroup, second As DateTimeGroup) As Boolean
    Parameters
    first
    DateTimeGroup

    The first DateTimeGroup.

    second
    DateTimeGroup

    The second DateTimeGroup.

    Returns
    System.Boolean

    true if first and second DateTimeGroups are equal; otherwise, false.

    Inequality(DateTimeGroup, DateTimeGroup)

    Determines whether first and second DateTimeGroups are not equal.

    • C#
    • VB.NET
    public static bool operator !=(DateTimeGroup first, DateTimeGroup second)
    Public Shared Operator <>(first As DateTimeGroup, second As DateTimeGroup) As Boolean
    Parameters
    first
    DateTimeGroup

    The first DateTimeGroup.

    second
    DateTimeGroup

    The second DateTimeGroup.

    Returns
    System.Boolean

    true if first and second DateTimeGroups are not equal; otherwise, false.

    Implements

    System.IEquatable<T>
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.