Published on InterSystems Developer Community (https://community.intersystems.com)

Home > How to change valid Date range to a valid Time range

Question
Lionel Woods · Sep 28, 2021

How to change valid Date range to a valid Time range

I am trying to convert a valid date range (Previous Day - Current Day) to a valid date/time range (-15 mins from current date/time to current date/time) for a Task to run (Format needs to be YYYY-MM-DD hh:mm:ss)

Code being used currently for date range is 

set previousDay=$zdatetime($horolog-1,3)
set currentDay=$zdatetime($horolog-0,3)

Can anyone help?

#Caché
Product version: HealthShare 2017.2

Source URL:https://community.intersystems.com/post/how-change-valid-date-range-valid-time-range