Click or drag to resize

DateTime Function (Long, Long, Long, Long, Long)

X#
Returns the current date and time as a DateTime value, or creates a year 2000-compliant DateTime value.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax
 FUNCTION DateTime(
	nYear AS LONG,
	nMonth AS LONG,
	nDay AS LONG,
	nHours AS LONG,
	nMinutes AS LONG
) AS DateTime
Request Example View Source

Parameters

nYear
Type: Long
Specifies the year in the DateTime value. nYear can be a value from 100 to 9999.
nMonth
Type: Long
Specifies the month in the DateTime value. nMonth can be a value from 1 to 12.
nDay
Type: Long
Specifies the day in the DateTime value. nDay can be a value from 1 to 31.
nHours
Type: Long
Specifies the hours in the DateTime value. nHours can be a value from from 0 (midnight) to 23 (11 P.M). Defaults to 0 if omitted.
nMinutes
Type: Long
Specifies the minutes in the DateTime value. nMinutes can be a value from 0 to 59. Defaults to 0 if omitted.

Return Value

Type: DateTime
See Also