3-1-Functions:DateDiff
last edited by
lmajano
on 23-Aug-2009
Contents |
DateDiff
Description
Determines the number of units between date1 and date2. Units are specified by "datapart".
Category
Date and time
Implemented
Usage Syntax
DateDiff(datepart,date1,date2)
Return Information
| Return Type | Return Description |
| number | Returns an integer value for date2 minus date1. |
Arguments
| Name | Type | Required | Position | Default | Description |
| datepart | String | Yes | 1 | String the specifies the type of unit. <br/><br/> Unit types: <ul> <li>yyyy - year</li> <li>q - quarter</li> <li>m - month</li> <li>w - week</li> <li>ww - same as "w"</li> <li>d - day</li> <li>y - same as "d"</li> <li>h - hour</li> <li>n - minute</li> <li>s - second</li> </ul> This parameter is case insensitive. | |
| date1 | datetime | Yes | 2 | A date object. | |
| date2 | datetime | Yes | 3 | A date object. |
SideBar
User Login
Comments (