The new Date-Time group interval is not working with Nullable(Of DateTime), it works with DateTime however.
Steps to Reproduce:
Define a field as Nullable(Of DateTime) instead of just DateTime
No grouping interval possibility with nullable DateTime
New Date-Time grouping interval working, even with nullable DateTime
I get different results. I have a class which has a Date defined as nullable (see code below). When I group by this column, I don't get the new datetime interval options.
When I make an unbound column using the expression editor (based on the nullable date) and mark the field DateTime instead of Bound, I do get the datetime interval options.
<System.ComponentModel.DisplayName("SUB J_ Cre Dat")> _
Public Overridable Property SUBJ_CreDat_Value As Nullable(Of DateTime)
Get 'get accessor method
If SUBJ_CreDat Is Nothing Then
Else If SUBJ_CreDat.IsNull Then
Set(ByVal value As Nullable(Of DateTime)) 'set accessor method
If Not value.HasValue Then
SUBJ_CreDat.IsNull = True
SUBJ_CreDat.Value = value.Value
Please look at the attached sample. I've also included 2 pictures showing what happens. Normal DateTime fields can be grouped using intervals, Nullable DateTimes can't.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.