![]() ![]() |
Reference Type: Supported, Category: Date Functions, ICR#: 10103
The $$FMDIFF^XLFDT extrinsic function returns the difference between two VA FileMan format dates.
$$FMDIFF^XLFDT(x1,x2[,x3])
x1: |
(required) VA FileMan date. |
x2: |
(required) VA FileMan date, to subtract from the x1 date. |
x3: |
(optional) If NULL, `$D(x3), return the difference in days. Otherwise:
|
returns: |
Returns the date and/or time difference. |
The following example returns the difference between two dates/times in days (x3 = NULL or 1). In this example, the first date is 2 days less than the second date:
>S X=$$FMDIFF^XLFDT(2901229,2901231.111523) >W X -2 >S X=$$FMDIFF^XLFDT(2901229,2901231.111523,1) >W X -2 |
The following example returns the difference between two dates/times in seconds (x3 = 2). In this example, the first date is 150,079 seconds greater than the second date:
>S X=$$FMDIFF^XLFDT(2901231.111523,2901229.173404,2) >W X 150079 |
The following example returns the difference between two dates/times in DD HH:MM:SS (x3 = 3). In this example, the first date is 1 day, 1 hour, 24 minutes, and 2 seconds greater than the second date:
>S X=$$FMDIFF^XLFDT(2901231.024703,2901230.012301,3) >W X 1 1:24:2 |