HealthRecordCommunity
FHIR🌏 InternationalEnriched

How to use the $millis() function: Explanation of milliseconds retrieval using JSONata

$millis - FUME - FHIR Converter

June 17, 2026

Summary

This article explains the `$millis()` function within the data transformation language JSONata. This function is shown to return the number of milliseconds since the Unix Epoch (January 1, 1970 UTC) as a number. Basic usage and type checking methods are demonstrated.

Details

This page functions as a technical reference or tutorial for the data manipulation language JSONata. It specifically focuses on explaining the `$millis()` function, which retrieves the number of milliseconds since the Unix Epoch as a numerical value. The article provides basic usage examples, such as a specific resulting value (1502700297574). Furthermore, it covers technical aspects like checking the input type (`$type ( $millis ())`) and demonstrating that repeated calls within an expression are stable (`$millis () = $millis ()`). This provides foundational knowledge for handling time information in data linkage systems, which is useful for managing temporal data during data exchange and processing logic construction in healthcare IT systems. The function standardizes specific time information into millisecond units, allowing it to be used for data exchange and building processing logic across different systems. By utilizing JSONata, a flexible query language, it becomes possible to handle various data formats using a unified timeline (milliseconds since the epoch).

📰
Read Original Article
fume.health

Original content copyright by respective publishers