TIME1

Returns a DateTime value with the specified hour, minute, and second.  If the date is not entered, the date by default is set to system date.

Syntax

= TIME1(hour, minute, second)

Parameters

Hour

A value representing the hours. The value can be specified as an integer (e.g., 21), as a string (“21”), or as the value of a variable (e.g, UnitPrice).

Minute

A value representing the minutes. The value can be specified as an integer (e.g., 21), as a string (“21”), or as the value of a variable (e.g, UnitPrice).

Second

A value representing the minutes. The value can be specified as an integer (e.g., 21), as a string (“21”), or as the value of a variable (e.g, UnitPrice).

Return Type

DateTime. The function returns a Microsoft .NET DateTime object.  Any properties or member functions of the DateTime object can also be accessed or used.

Examples

Example

Returns

= TIME1(“21”, “30”, “30”)

1/28/2010 9:30:30 PM

= TIME1(21, 30, 30)

1/28/2010 9:30:30 PM

= TIME1(“x”, “y” “z”)

Displays message “TIME1(x, y, z): Input string was not in a correct format.”

= TIME1(ShippedDate.Hour, ShippedDate.Minute, ShippedDate.Second)

The DateTime with time extracted from the value of ShippedDate and date from system date. If any entries are NULL then returns the DateTime extracted from the system time.

= TIME1(“27”, “30”, “30”).Hour

The hours as 3.

= TIME1(“0”, “0”, “0”).AddHours(5)

The system date and time as 5 AM.

= TIME1(“27”, “0”, “0”).AddHours(5).Hour

The hour, 5 hours after the specified time.

Reference

http://msdn.microsoft.com/en-us/library/system.datetime_members(VS.71).aspx