Kernel 8.0 APIs Banner [skip navigation]
Office of Information & Technology (OIT) Banner

$$FMDIFF^XLFDT(): VA FileMan Date Difference

Reference Type: Supported, Category: Date Functions, Integration Agreement: 10103

Description

This extrinsic function returns the difference between two VA FileMan format dates.

Format

  $$FMDIFF^XLFDT(x1,x2[,x3])

Input Parameters

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:

  • If x3 = 1, return the difference in days.

  • If x3 = 2, return the difference in seconds.

  • If x3 = 3, return the difference in days hours:minutes:seconds format (DD HH:MM:SS).

Output

returns:

Returns the date and/or time difference.

Example 1

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

Example 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

Example 3

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

 


VA (Internet) / VA(Intranet) / OI / PD / Site Map / Terms of Use / VA Privacy Policy / Accessibility

Reviewed/Updated: August 26, 2011

If you have questions, need more information, or are having accessibility problems with this website, please contact us by E-Mail: Webmasters, Phone: 510-768-6800, or FAX: 510-768-6850.