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

$$HDIFF^XLFDT(): $H Difference

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

Description

This extrinsic function returns the difference between two $H formatted dates.

Format

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

Input Parameters

x1:

(required) $H date (in quotes).

x2:

(required) $H date (in quotes) 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 $H difference.

Example 1

Return the $H difference in days.

>S X=$$HDIFF^XLFDT("54789,40523","54786,25983",1)

>W X
3

Example 2

Return the $H difference in seconds.

>S X=$$HDIFF^XLFDT("54789,40523","54786,25983",2)

>W X
273740

Example 3

Return the $H difference in days hours:minutes:seconds format (DD HH:MM:SS).

>S X=$$HDIFF^XLFDT("54789,40523","54786,25983",3)

>W X
3 4:02:20

 


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.