Welcome to the DR Network.

Everything you need to get started building reports with Data Repository. All free and available for every MEDITECH version from MAGIC to Expanse. Sign up today!

Contact us

Get end of day (function)

  • MT platform: All

This scalar TSQL function calculates the last second of a given day (23:59:59) when passed a date in mm/dd/yyyy format. Useful for getting to the end of a day on reports that prompt the user for a date range.

(Read our blog for more information about user-defined functions in T-SQL.)

  To download this report, please log in or create an account.  


fn get end of day