DicomObjects Reference
DicomObjects Reference / DicomAttribute Object / DateTimeFrom Property
The date/Time to return where the DICOM value has no lower bound
DateTimeFrom Property
Description
The date to return for an open ended date
Property type
Read-only property
Syntax
Visual Basic
Public Property DateTimeFrom( _
   ByVal MinDateTime As Date _
) As Date
Parameters
MinDateTime
The date/Time to return where the DICOM value has no lower bound
Remarks

The dateTimeFrom and DateTimeTo properties are intended for use in servers which need to interpret date and time values which may (or may not) be expressed as a range.  In previous versions of DicomObjects such values have been presented simply as strings, leaving the programmer to interpret them, but these methods make such use much easier.
The properties are designed to used where it is necessary to convert DICOM request date or time ranges to SQL or similar, and allow the programmer to supply a suitable “default” date, which should be a reasonable maximum or minimum supported by the database.  e.g. the following SQL may be useful :

“WHERE examdate >=” & range.DataTimeFrom(#1/1/1800#) & “ AND examdate <=” & range.DateTimeTo(#31/12/2099#)”
The efficiency could be improved by checking for default values and excluding the superfluous clauses, but the above general form should always work.
These properties successfully handle all standard forms of range, including a single value, and if a null range is passed, then both properties return their default values.  This can be summarised as follows:

Range form DateTimeFrom DateTimeTo
Null MinDateTime MaxDateTime
SINGLEVALUE SINGLEVALUE SINGLEVALUE
-UPPER MinDateTime UPPER
LOWER- LOWER MaxDateTime
LOWER-UPPER LOWER UPPER

  


 

 

See Also