This should be simple, but for the life of me I cannot find a documented way to do it that works.
I have a date/time for an alarm, and I want to subtract some number of minutes from it. Its for a sunrise alarm that slowly dims from 0 to 100.
The inputs for the app are:
input alarmTime, time, title: Alarm Time, submitOnChange: true, required: true | |||
---|---|---|---|
input alarmDuration, number, title: Alarm Duration (minutes), defaultValue: 30, required: false, range: 15..60, submitOnChange: true |
And later in my code I would think I should be able to do:
def adjustedAlarmTime = alarmTime - (alarmDuration * 60000)
But no success, what am I doing wrong here?