Try OpenEdge Now
skip to main content
ABL Reference
Class Properties and Methods Reference : Create( ) method (DATETIME)
 

Create( ) method (DATETIME)

(Windows only; GUI for .NET only)
Use this set of Create( ) method overloads to initialize DATETIME values in ABL.
Note: This method is used primarily by the Visual Designer during code generation. You should not expect to use this method directly.
Return type: DATETIME
Access: PUBLIC STATIC
Applies to: Progress.Util.DateTimeHelper class

Syntax

DateTimeHelper:Create ( method-parameters )
method-parameters
A CHARACTER expression that contains one or more parameters for this method (based on the method overload).
The following table describes the Create( ) method overloads for initializing DATETIME values.
Table 132. Create( ) method overloads for DATETIME values
Method overload syntax
Description
Create( INPUT ticks AS INT64 )
Returns a DATETIME initialized to a specified number of ticks (time values measured in 100-nanosecond units)
Create( INPUT ticks AS INT64,
        INPUT kind AS System.DateTimeKind )
Returns a DATETIME initialized to a specified number of ticks and to Coordinated Universal Time (UTC) or local time
Create( INPUT year AS INTEGER,
        INPUT month AS INTEGER,
        INPUT day AS INTEGER )
Returns a DATETIME initialized to the specified year, month, and day
Create( INPUT year AS INTEGER,
        INPUT month AS INTEGER,
        INPUT day AS INTEGER,
        INPUT calendar AS
           System.Globalization.Calendar )
Returns a DATETIME initialized to the specified year, month, and day for the specified calendar
Create( INPUT year AS INTEGER,
        INPUT month AS INTEGER,
        INPUT day AS INTEGER,
        INPUT hour AS INTEGER,
        INPUT minute AS INTEGER,
        INPUT second AS INTEGER )
Returns a DATETIME initialized to the specified year, month, day, hour, minute, and second
Create( INPUT year AS INTEGER,
        INPUT month AS INTEGER,
        INPUT day AS INTEGER,
        INPUT hour AS INTEGER,
        INPUT minute AS INTEGER,
        INPUT second AS INTEGER,
        INPUT calendar AS
           System.Globalization.Calendar )
Returns a DATETIME initialized to the specified year, month, day, hour, minute, and second for the specified calendar
Create( INPUT year AS INTEGER,
        INPUT month AS INTEGER,
        INPUT day AS INTEGER,
        INPUT hour AS INTEGER,
        INPUT minute AS INTEGER,
        INPUT second AS INTEGER,
        INPUT kind AS System.DateTimeKind )
Returns a DATETIME initialized to the specified year, month, day, hour, minute, and second and to Coordinated Universal Time (UTC) or local time
Create( INPUT year AS INTEGER,
        INPUT month AS INTEGER,
        INPUT day AS INTEGER,
        INPUT hour AS INTEGER,
        INPUT minute AS INTEGER,
        INPUT second AS INTEGER,
        INPUT millisecond AS INTEGER )
Returns a DATETIME initialized to the specified year, month, day, hour, minute, second, and millisecond
Create( INPUT year AS INTEGER,
        INPUT month AS INTEGER,
        INPUT day AS INTEGER,
        INPUT hour AS INTEGER,
        INPUT minute AS INTEGER,
        INPUT second AS INTEGER,
        INPUT millisecond AS INTEGER,
        INPUT calendar AS
           System.Globalization.Calendar )
Returns a DATETIME initialized to the specified year, month, day, hour, minute, second, and millisecond for the specified calendar
Create( INPUT year AS INTEGER,
        INPUT month AS INTEGER,
        INPUT day AS INTEGER,
        INPUT hour AS INTEGER,
        INPUT minute AS INTEGER,
        INPUT second AS INTEGER,
        INPUT millisecond AS INTEGER,
        INPUT kind AS System.DateTimeKind )
Returns a DATETIME initialized to the specified year, month, day, hour, minute, second, and millisecond and to Coordinated Universal Time (UTC) or local time
Create( INPUT year AS INTEGER,
        INPUT month AS INTEGER,
        INPUT day AS INTEGER,
        INPUT hour AS INTEGER,
        INPUT minute AS INTEGER,
        INPUT second AS INTEGER,
        INPUT millisecond AS INTEGER,
        INPUT calendar AS
           System.Globalization.Calendar,
        INPUT kind AS System.DateTimeKind )
Returns a DATETIME initialized to the specified year, month, day, hour, minute, second, and millisecond for the specified calendar and to Coordinated Universal Time (UTC) or local time
The following example uses this method to initialize a DATETIME variable with the date, July 28, 1986, and then displays the result:
USING Progress.Util.* FROM ASSEMBLY.

DEFINE VARIABLE aDateTime AS DATETIME NO-UNDO.

aDateTime = DateTimeHelper:Create( 1986, 7, 28 ).

Display aDateTime.

See also

Create( ) method (CHARACTER), Create( ) method (DECIMAL)