Date formats

From VistApedia
Jump to: navigation, search

In VistA, dates are usually in FileMan Date Format (sometimes called Timson Date Format) see also: http://www.hardhats.org/fileman/pm/cl_dt.htm

Quoting from Hardhats.org:
  • VA FileMan's conventional internal format: "YYYMMDD.HHMMSS":
  • YYY is number of years since 1700 (hence always 3 digits)
  • MM is month number (00-12)
  • DD is day number (00-31)
  • HH is hour number (00-23)
  • MM is minute number (01-59)
  • SS is the seconds number (01-59)
This format allows for representation of imprecise dates like JULY '78 or 1978 (which would be equivalent to 2780700 and 2780000, respectively).
Dates are always returned as a canonic number (no trailing zeroes after the decimal).
  • Today's date is usually available while VistA is running in the variable DT in FileMan format.

Mumps has the $Horolog intrinsic variable [1]

  • $H[OROLOG] contains a string value specifying the number of days since "31 December, 1840,"
  • and the number of seconds since midnight of date in the time zone of the process, separated by a comma (,)

HL7 has a date definition [2]

"The value of a point in time is represented using the ISO 8601 compliant form traditionally in use with HL7. This is the form that has no decorating dashes, colons and no "T" between the date and time. In short, the syntax is "YYYYMMDDHHMMSS.UUUU[+|-ZZzz]" where digits can be omitted from the right side to express less precision. Common forms are "YYYYMMDD" and "YYYYMMDDHHMM", but the ability to truncate on the right side is not limited to these two variants. See the Data Types Abstract Specification for detail."

And Linux has a "date" command.

TEST>W ! ZSYstem "date" Write "$Horolog="_$H_" where "_$P($H,",")_"/365.25 = "_(
$P($H,",")/365.25)_" years since 1841",!,"DT="_DT,!,"FM date/time="_$$NOW^XLFDT(
)_" where 315 is years since 1700",!,"HL7 date/time="_$$FMTHL7^XLFDT($$NOW^XLFDT
())

Fri Sep 11 14:53:12 EDT 2015
$Horolog=63806,53592 where 63806/365.25 = 174.691307323750855 years since 1841
DT=3150911
FM date/time=3150911.145312 where 315 is years since 1700
HL7 date/time=20150911145312-0500

--Sherlocksfriend (talk) 12:33, 9 September 2015 (MDT)