(int Year)
Returns a new date with specified or default parameters.
Example: DATE(2016) returns a new date (2016-1-1 00:00:00.000)
Year: Optional. The year (1 through 9999). Defaults to 1.
(int Year, int Month)
Returns a new date with specified or default parameters.
Example: DATE(2016,1) returns a new date (2016-1-1 00:00:00.000)
Year: Optional. The year (1 through 9999). Defaults to 1.
(int Year, int Month, int day)
Returns a new date with specified or default parameters.
Example: DATE(2016,1,20) returns a new date (2016-1-20 00:00:00.000)
Year: Optional. The year (1 through 9999). Defaults to 1.
(int Year, int Month, int day, int hour)
Returns a new date with specified or default parameters.
Example: DATE(2016,1,20,1) returns a new date (2016-1-20 01:00:00.000)
Year: Optional. The year (1 through 9999). Defaults to 1.
(int Year, int Month, int day, int hour, int minute)
Returns a new date with specified or default parameters.
Example: DATE(2016,1,20,1,2) returns a new date (2016-1-20 01:02:00.000)
Year: Optional. The year (1 through 9999). Defaults to 1.
(int Year, int Month, int day, int hour, int minute, int second)
Returns a new date with specified or default parameters.
Example: DATE(2016,1,20,1,2,3) returns a new date (2016-1-20 01:02:03.000)
Year: Optional. The year (1 through 9999). Defaults to 1.
(int Year, int month, int Day, int hour, int minute, int second, int millisecond)
Returns a new date with specified or default parameters.
Example: DATE(2016,1,20,1,2,3,400) returns a new date (2016-1-20 01:02:03.400)
Year: Optional. The year (1 through 9999). Defaults to 1.
Example 1
Create a Date key from only Year and Month information (defaulting to the 1st of every month):
date(&Year,&Month,"1")
Example 2
Create a Date key from one field that contains Year and Month information (defaulting to the 1st of every month):
date(left(&YearMonth,4),right(&YearMonth,len(&YearMonth)-5))
Comments
Please sign in to leave a comment.